helm: opentelemetry addon allow configuration of registry with setting tag (#9773)
* feat: allow configuration of registry, image, tag and digest in single values for opentelemetry addon * feat: allow configuration of registry, image, tag and digest in single values for opentelemetry addon * add ci test file * fix: updated helm-docs with opentelemetry image value * fix: ci test case * fix: ci test case set default registry, image + tag * fix: ci test case set default registry + image * fix: remove unrequired comment * feat!: use extraModules helper method for templating the image value * image definition for OTel image is now split up in image, repo and registry values * feat!: move distroless config under the image key * update helm-docs * Refactor template to generate the image name * adapt test cases for extraModules * implement code review * try to fix ci test for opentelemetry
This commit is contained in:
parent
6807537a70
commit
7e31f818ff
8 changed files with 51 additions and 11 deletions
|
@ -387,9 +387,12 @@ As of version `1.26.0` of this chart, by simply not providing any clusterIP valu
|
|||
| controller.opentelemetry.containerSecurityContext.runAsNonRoot | bool | `true` | |
|
||||
| controller.opentelemetry.containerSecurityContext.runAsUser | int | `65532` | The image's default user, inherited from its base image `cgr.dev/chainguard/static`. |
|
||||
| controller.opentelemetry.containerSecurityContext.seccompProfile.type | string | `"RuntimeDefault"` | |
|
||||
| controller.opentelemetry.distroless | bool | `true` | |
|
||||
| controller.opentelemetry.enabled | bool | `false` | |
|
||||
| controller.opentelemetry.image | string | `"registry.k8s.io/ingress-nginx/opentelemetry:v20230721-3e2062ee5@sha256:13bee3f5223883d3ca62fee7309ad02d22ec00ff0d7033e3e9aca7a9f60fd472"` | |
|
||||
| controller.opentelemetry.image.digest | string | `"sha256:13bee3f5223883d3ca62fee7309ad02d22ec00ff0d7033e3e9aca7a9f60fd472"` | |
|
||||
| controller.opentelemetry.image.distroless | bool | `true` | |
|
||||
| controller.opentelemetry.image.image | string | `"ingress-nginx/opentelemetry"` | |
|
||||
| controller.opentelemetry.image.registry | string | `"registry.k8s.io"` | |
|
||||
| controller.opentelemetry.image.tag | string | `"v20230721-3e2062ee5"` | |
|
||||
| controller.opentelemetry.name | string | `"opentelemetry"` | |
|
||||
| controller.opentelemetry.resources | object | `{}` | |
|
||||
| controller.podAnnotations | object | `{}` | Annotations to be added to controller pods # |
|
||||
|
|
|
@ -7,4 +7,7 @@ controller:
|
|||
type: ClusterIP
|
||||
extraModules:
|
||||
- name: opentelemetry
|
||||
image: busybox
|
||||
image:
|
||||
registry: registry.k8s.io
|
||||
image: busybox
|
||||
tag: latest
|
||||
|
|
|
@ -9,4 +9,7 @@ controller:
|
|||
allowPrivilegeEscalation: false
|
||||
extraModules:
|
||||
- name: opentelemetry
|
||||
image: busybox
|
||||
image:
|
||||
registry: registry.k8s.io
|
||||
image: busybox
|
||||
tag: latest
|
||||
|
|
|
@ -7,6 +7,9 @@ controller:
|
|||
type: ClusterIP
|
||||
extraModules:
|
||||
- name: opentelemetry
|
||||
image: busybox
|
||||
image:
|
||||
registry: registry.k8s.io
|
||||
image: busybox
|
||||
tag: latest
|
||||
containerSecurityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
|
|
|
@ -7,4 +7,7 @@ controller:
|
|||
type: ClusterIP
|
||||
extraModules:
|
||||
- name: opentelemetry
|
||||
image: busybox
|
||||
image:
|
||||
registry: registry.k8s.io
|
||||
image: busybox
|
||||
tag: latest
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
controller:
|
||||
image:
|
||||
repository: ingress-controller/controller
|
||||
tag: 1.0.0-dev
|
||||
digest: null
|
||||
service:
|
||||
type: ClusterIP
|
||||
opentelemetry:
|
||||
enabled: true
|
|
@ -257,7 +257,8 @@ Extra modules.
|
|||
*/}}
|
||||
{{- define "extraModules" -}}
|
||||
- name: {{ .name }}
|
||||
image: {{ .image }}
|
||||
{{- with .image }}
|
||||
image: {{ if .repository }}{{ .repository }}{{ else }}{{ .registry }}/{{ .image }}{{ end }}:{{ .tag }}{{ if .digest }}@{{ .digest }}{{ end }}
|
||||
command:
|
||||
{{- if .distroless }}
|
||||
- /init_module
|
||||
|
@ -266,6 +267,7 @@ Extra modules.
|
|||
- -c
|
||||
- /usr/local/bin/init_module.sh
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .containerSecurityContext }}
|
||||
securityContext: {{ toYaml .containerSecurityContext | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -682,8 +682,15 @@ controller:
|
|||
# -- Modules, which are mounted into the core nginx image. See values.yaml for a sample to add opentelemetry module
|
||||
extraModules: []
|
||||
# - name: mytestmodule
|
||||
# image: registry.k8s.io/ingress-nginx/mytestmodule
|
||||
# distroless: false
|
||||
# image:
|
||||
# registry: registry.k8s.io
|
||||
# image: ingress-nginx/mytestmodule
|
||||
# ## for backwards compatibility consider setting the full image url via the repository value below
|
||||
# ## use *either* current default registry/image or repository format or installing chart by providing the values.yaml will fail
|
||||
# ## repository:
|
||||
# tag: "v1.0.0"
|
||||
# digest: ""
|
||||
# distroless: false
|
||||
# containerSecurityContext:
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: <user-id>
|
||||
|
@ -703,8 +710,15 @@ controller:
|
|||
opentelemetry:
|
||||
enabled: false
|
||||
name: opentelemetry
|
||||
image: registry.k8s.io/ingress-nginx/opentelemetry:v20230721-3e2062ee5@sha256:13bee3f5223883d3ca62fee7309ad02d22ec00ff0d7033e3e9aca7a9f60fd472
|
||||
distroless: true
|
||||
image:
|
||||
registry: registry.k8s.io
|
||||
image: ingress-nginx/opentelemetry
|
||||
## for backwards compatibility consider setting the full image url via the repository value below
|
||||
## use *either* current default registry/image or repository format or installing chart by providing the values.yaml will fail
|
||||
## repository:
|
||||
tag: "v20230721-3e2062ee5"
|
||||
digest: sha256:13bee3f5223883d3ca62fee7309ad02d22ec00ff0d7033e3e9aca7a9f60fd472
|
||||
distroless: true
|
||||
containerSecurityContext:
|
||||
runAsNonRoot: true
|
||||
# -- The image's default user, inherited from its base image `cgr.dev/chainguard/static`.
|
||||
|
|
Loading…
Reference in a new issue