-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add uninstall hook for the kube-stack chart (#1305)
* add uninstall hook * update values * set manual name * Update hooks * comment * plz * print the config * use normal helm * more * bump ci version * oops * oop * undo * down another * down another * down another * down another * idk maybe * matrix * whoops * Add exclude * fix the matrix * revert matrix change * version * oops
- Loading branch information
1 parent
c206e7b
commit 96fc70a
Showing
25 changed files
with
231 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/hooks.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: delete-resources-sa | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: delete-resources-role | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
rules: | ||
- apiGroups: | ||
- opentelemetry.io | ||
resources: | ||
- instrumentations | ||
- opampbridges | ||
- opentelemetrycollectors | ||
verbs: | ||
- get | ||
- list | ||
- delete | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: delete-resources-rolebinding | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: delete-resources-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: delete-resources-sa | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: opentelemetry-kube-stack-pre-delete-job | ||
annotations: | ||
"helm.sh/hook": pre-delete | ||
"helm.sh/hook-delete-policy": hook-succeeded,hook-failed | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: Never | ||
serviceAccountName: delete-resources-sa | ||
containers: | ||
- name: delete-resources | ||
image: bitnami/kubectl:latest | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
kubectl delete instrumentations,opampbridges,opentelemetrycollectors \ | ||
-l helm.sh/chart=opentelemetry-kube-stack-0.1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
charts/opentelemetry-kube-stack/examples/cloud-demo/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
clusterName: demo | ||
opentelemetry-operator: | ||
enabled: true | ||
collectors: | ||
daemon: | ||
ports: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/hooks.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: delete-resources-sa | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: delete-resources-role | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
rules: | ||
- apiGroups: | ||
- opentelemetry.io | ||
resources: | ||
- instrumentations | ||
- opampbridges | ||
- opentelemetrycollectors | ||
verbs: | ||
- get | ||
- list | ||
- delete | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: delete-resources-rolebinding | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: delete-resources-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: delete-resources-sa | ||
--- | ||
# Source: opentelemetry-kube-stack/templates/hooks.yaml | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: opentelemetry-kube-stack-pre-delete-job | ||
annotations: | ||
"helm.sh/hook": pre-delete | ||
"helm.sh/hook-delete-policy": hook-succeeded,hook-failed | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: Never | ||
serviceAccountName: delete-resources-sa | ||
containers: | ||
- name: delete-resources | ||
image: bitnami/kubectl:latest | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
kubectl delete instrumentations,opampbridges,opentelemetrycollectors \ | ||
-l helm.sh/chart=opentelemetry-kube-stack-0.1.3 |
2 changes: 0 additions & 2 deletions
2
charts/opentelemetry-kube-stack/examples/prometheus-otel/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
clusterName: demo | ||
opentelemetry-operator: | ||
enabled: true | ||
collectors: | ||
daemon: | ||
enabled: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{- if .Values.cleanupJob.enabled }} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: delete-resources-sa | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: delete-resources-role | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
rules: | ||
- apiGroups: | ||
- opentelemetry.io | ||
resources: | ||
- instrumentations | ||
- opampbridges | ||
- opentelemetrycollectors | ||
verbs: | ||
- get | ||
- list | ||
- delete | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: delete-resources-rolebinding | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: delete-resources-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: delete-resources-sa | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ include "opentelemetry-kube-stack.name" . }}-pre-delete-job | ||
annotations: | ||
"helm.sh/hook": pre-delete | ||
"helm.sh/hook-delete-policy": hook-succeeded,hook-failed | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: Never | ||
serviceAccountName: delete-resources-sa | ||
containers: | ||
- name: delete-resources | ||
image: bitnami/kubectl:latest | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
kubectl delete instrumentations,opampbridges,opentelemetrycollectors \ | ||
-l helm.sh/chart={{ include "opentelemetry-kube-stack.chart" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.