Skip to content

Commit

Permalink
Update values comments & validation to match spec
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonshatch authored and gamingrobot committed Jan 26, 2024
1 parent c3c967c commit 3e7403b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
13 changes: 6 additions & 7 deletions manifests/helm/templates/agent-injectors.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@ spec:
image:
{{- $injector.image | toYaml | nindent 4 }}
{{- end}}
{{- if or $injector.selector $injector.images }}
{{ $selector := $injector.selector | default dict -}}
{{- $labels := $selector.labels -}}
{{- $images := $selector.images -}}
{{- $_ := required "One of injector.selector.labels or injector.selector.images required" (coalesce $labels $images) -}}
selector:
{{- if $labels }}
{{- if $selector.labels }}
labels:
{{- $labels | toYaml | nindent 6 }}
{{- $selector.labels | toYaml | nindent 6 }}
{{- end }}
{{- if $images }}
{{- if $selector.images }}
images:
{{- $images | toYaml | nindent 6 }}
{{- $selector.images | toYaml | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
6 changes: 5 additions & 1 deletion manifests/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ agentInjectors:
name: contrast-java-injector
# Optional, defaults to true (enabled)
enabled: true
#Required. This injector will be created in each specified namespace.
# Required. This injector will be created in each specified namespace.
namespaces:
- default
# Optional, specify labels and/or image names to inject. If omitted, all workloads will be injected.
# Label selections are cumulative using the logical AND operation.
selector:
labels:
- name: contrast-agent
value: java
#images:
# - imagename
# Optional image configuration.
# image:
# registry: docker.io/contrast
Expand Down

0 comments on commit 3e7403b

Please sign in to comment.