Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(admission-controller): Bump Admission-controller to 0.16.8 #2128

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

lior-alafi-work
Copy link
Contributor

What this PR does / why we need it:

Checklist

  • Title of the PR starts with type and scope, (e.g. feat(agent,node-analyzer,sysdig-deploy):)
  • Chart Version bumped for the respective charts
  • Variables are documented in the README.md (or README.tpl in some charts)
  • Check GithubAction checks (like lint) to avoid merge-check stoppers
  • All test files are added in the tests folder of their respective chart and have a "_test" suffix

@lior-alafi-work lior-alafi-work requested a review from a team as a code owner January 23, 2025 09:49
@mavimo mavimo marked this pull request as draft January 24, 2025 10:12
@lior-alafi-work lior-alafi-work marked this pull request as ready for review January 26, 2025 09:33
@mavimo mavimo force-pushed the admission_controller_http_rc branch from db60d88 to 85c0eab Compare January 27, 2025 11:49
@lior-alafi-work lior-alafi-work enabled auto-merge (squash) January 27, 2025 11:56
@mavimo
Copy link
Contributor

mavimo commented Jan 27, 2025

@lior-alafi-work please integrate the values from global.sysdig.* as endpoints, see as example:

  • {{- if and (not .Values.cluster_shield.sysdig_endpoint.api_url) .Values.global.sysdig.apiHost -}}
    {{- $_ := set $conf.sysdig_endpoint "api_url" .Values.global.sysdig.apiHost -}}
    {{- if not (or (hasPrefix "https://" .Values.global.sysdig.apiHost) (hasPrefix "http://" .Values.global.sysdig.apiHost)) -}}
    {{- $_ := set $conf.sysdig_endpoint "api_url" (printf "https://%s" .Values.global.sysdig.apiHost) -}}
    {{- end -}}

and regions like:

  • {{/*
    Determine sysdig secure endpoint based on provided region
    */}}
    {{- define "secureUrl" -}}
    {{- if (or .Values.collectorSettings.collectorHost (eq .Values.global.sysdig.region "custom")) -}}
    {{- required "collectorSettings.collectorHost is required for custom regions" (.Values.collectorSettings.collectorHost) -}}
    {{- else if hasKey ((include "sysdig.regions" .) | fromYaml) .Values.global.sysdig.region -}}
    {{- include "sysdig.secureUi" . }}
    {{- else -}}
    {{- fail (printf "global.sysdig.region=%s provided is not recognized." .Values.global.sysdig.region ) -}}
    {{- end -}}
    {{- end -}}
    {{/*
    Determine api endpoint based on provided region
    */}}
    {{- define "agent.secureApiEndpoint" -}}

Thanks!

@mavimo mavimo disabled auto-merge January 27, 2025 12:00
Copy link
Contributor

@mavimo mavimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see management for global values and regions

@chen-shmilovich-sysdig
Copy link
Contributor

@mavimo based on the admission controller helpers, it looks like we do use the sysdig.global values.

{{/*
Determine Secure endpoint based on provided region or .Values.sysdig.apiEndpoint
*/}}
{{- define "admissionController.apiEndpoint" -}}
    {{- if (or .Values.sysdig.apiEndpoint (eq .Values.global.sysdig.region "custom"))  -}}
        {{- required "A valid Sysdig API endpoint (.sysdig.apiEndpoint) is required" .Values.sysdig.apiEndpoint -}}
    {{- else if hasKey ((include "sysdig.regions" .) | fromYaml) .Values.global.sysdig.region }}
        {{- include "sysdig.secureApiEndpoint" . }}
    {{- end -}}
{{- end -}}

Should .Values.global.sysdig.apiHost be regarded or .Values.global.sysdig.region or both?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants