Skip to content

Commit

Permalink
feat[opentelemetry-kube-stack] cleanupJob add support custom image an…
Browse files Browse the repository at this point in the history
…d registry
  • Loading branch information
Genady Postrilko committed Jan 9, 2025
1 parent 2d8972d commit b785074
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-kube-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-kube-stack
version: 0.3.9
version: 0.3.10
description: |
OpenTelemetry Quickstart chart for Kubernetes.
Installs an operator and collector for an easy way to get started with Kubernetes observability.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: OpAMPBridge
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-cluster-stats
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down Expand Up @@ -187,7 +187,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ spec:
containers:
- name: delete-resources
image: bitnami/kubectl:latest
image: "bitnami/kubectl:latest"
command:
- /bin/sh
- -c
- |
kubectl delete instrumentations,opampbridges,opentelemetrycollectors \
-l helm.sh/chart=opentelemetry-kube-stack-0.3.9
-l helm.sh/chart=opentelemetry-kube-stack-0.3.10
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Instrumentation
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: default
labels:
app: opentelemetry-kube-stack-apiserver
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app: opentelemetry-kube-stack-kube-controller-manager
jobLabel: kube-controller-manager
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: default
labels:
app: opentelemetry-kube-stack-kube-controller-manager
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app: opentelemetry-kube-stack-kube-dns
jobLabel: kube-dns
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: default
labels:
app: opentelemetry-kube-stack-kube-dns
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app: opentelemetry-kube-stack-kube-etcd
jobLabel: kube-etcd
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: default
labels:
app: opentelemetry-kube-stack-kube-etcd
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app: opentelemetry-kube-stack-kube-proxy
jobLabel: kube-proxy
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: default
labels:
app: opentelemetry-kube-stack-kube-proxy
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app: opentelemetry-kube-stack-kube-scheduler
jobLabel: kube-scheduler
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: default
labels:
app: opentelemetry-kube-stack-kube-scheduler
helm.sh/chart: opentelemetry-kube-stack-0.3.9
helm.sh/chart: opentelemetry-kube-stack-0.3.10
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
release: "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ spec:
containers:
- name: delete-resources
image: bitnami/kubectl:latest
image: "bitnami/kubectl:latest"
command:
- /bin/sh
- -c
- |
kubectl delete instrumentations,opampbridges,opentelemetrycollectors \
-l helm.sh/chart=opentelemetry-kube-stack-0.3.9
-l helm.sh/chart=opentelemetry-kube-stack-0.3.10
5 changes: 5 additions & 0 deletions charts/opentelemetry-kube-stack/templates/hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ spec:
containers:
- name: delete-resources
image: bitnami/kubectl:latest
{{- if $.Values.cleanupJob.image.digest }}
image: "{{ $.Values.cleanupJob.image.repository }}@{{ $.Values.cleanupJob.image.digest }}"
{{- else }}
image: "{{ $.Values.cleanupJob.image.repository }}:{{ $.Values.cleanupJob.image.tag }}"
{{- end }}
command:
- /bin/sh
- -c
Expand Down
6 changes: 6 additions & 0 deletions charts/opentelemetry-kube-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ cleanupJob:
# For non-helm installations i.e. ones created via helm template, it may make sense to disable this.
# For those installations, ensure that uninstallation for the operator happens _after_ the deletion of the CRs.
enabled: true
# Image details for the kubectl
image:
repository: bitnami/kubectl
tag: latest
# When digest is set to a non-empty value, images will be pulled by digest (regardless of tag value).
digest: ""

# Should the CRDs be installed by this chart.
crds:
Expand Down

0 comments on commit b785074

Please sign in to comment.