-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/51.0.3' into fix/remove-duplicate-datasource
- Loading branch information
Showing
9 changed files
with
398 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
charts/kube-prometheus-stack | ||
demomon.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
Binary file not shown.
Binary file not shown.
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,37 @@ | ||
spec: | ||
containers: | ||
- name: alertmanager | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
- name: config-reloader | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
initContainers: | ||
- name: init-config-reloader | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
securityContext: | ||
fsGroup: 1000 | ||
supplementalGroups: | ||
- 1000 |
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,23 @@ | ||
# kubectl patch deployment project-monitoring-grafana --patch-file patches/grafana-patch.json --type=json | ||
- op: replace | ||
path: "/spec/template/spec/containers/0/securityContext" | ||
value: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 472 | ||
runAsGroup: 472 | ||
- op: replace | ||
path: "/spec/template/spec/initContainers/0/securityContext" | ||
value: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 472 | ||
runAsGroup: 472 |
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,39 @@ | ||
# https://prometheus-operator.dev/docs/operator/strategic-merge-patch/ | ||
# kubectl patch prometheus project-monitoring-prometheus --patch-file patches/prometheus-patch.yaml --type=merge | ||
spec: | ||
containers: | ||
- name: config-reloader | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
- name: prometheus | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
initContainers: | ||
- name: init-config-reloader | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
securityContext: | ||
fsGroup: 1000 | ||
supplementalGroups: | ||
- 1000 |
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,94 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: project-monitoring-patch-job | ||
labels: | ||
{{- include "caas-project-monitoring.labels" . | nindent 4 }} | ||
data: | ||
{{ (.Files.Glob "patches/*").AsConfig | indent 2 }} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
{{- include "caas-project-monitoring.labels" . | nindent 4 }} | ||
name: project-monitoring-patch-job | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
labels: | ||
{{- include "caas-project-monitoring.labels" . | nindent 4 }} | ||
name: project-monitoring-patch-job | ||
rules: | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- deployments | ||
verbs: | ||
- get | ||
- patch | ||
- update | ||
- apiGroups: | ||
- monitoring.coreos.com | ||
resources: | ||
- alertmanagers | ||
- prometheuses | ||
verbs: | ||
- get | ||
- patch | ||
- update | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
labels: | ||
{{- include "caas-project-monitoring.labels" . | nindent 4 }} | ||
name: project-monitoring-patch-job | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: project-monitoring-patch-job | ||
subjects: | ||
- kind: ServiceAccount | ||
name: project-monitoring-patch-job | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
annotations: | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "caas-project-monitoring.labels" . | nindent 4 }} | ||
name: project-monitoring-patch-job | ||
namespace: {{ include "caas-project-monitoring.namespace" . }} | ||
spec: | ||
backoffLimit: 1 | ||
completions: 1 | ||
parallelism: 1 | ||
template: | ||
spec: | ||
containers: | ||
#- args: ["-c","kubectl patch prometheus project-monitoring-prometheus --patch-file patches/prometheus-patch.yaml --type=merge && kubectl patch alertmanager project-monitoring-alertmanager --patch-file patches/alertmanager-patch.yaml --type=merge && kubectl patch deployment project-monitoring-grafana --patch-file patches/grafana-patch.json --type=json && exit 0"] | ||
- args: ["-c","kubectl patch prometheus project-monitoring-prometheus --patch-file patches/prometheus-patch.yaml --type=merge && kubectl patch alertmanager project-monitoring-alertmanager --patch-file patches/alertmanager-patch.yaml --type=merge && exit 0"] | ||
command: ["sh"] | ||
image: "{{ .Values.caas.patchjob.image.repository }}:{{ .Values.caas.patchjob.image.tag }}" | ||
imagePullPolicy: {{ .Values.caas.patchjob.pullPolicy | default "Always" }} | ||
name: kubectl | ||
resources: | ||
{{- toYaml .Values.caas.patchjob.resources | nindent 10 }} | ||
securityContext: | ||
{{- toYaml .Values.caas.patchjob.securityContext | nindent 10 }} | ||
volumeMounts: | ||
- mountPath: /patches | ||
name: project-monitoring-patch-job | ||
restartPolicy: Never | ||
securityContext: | ||
{{- toYaml .Values.caas.patchjob.podSecurityContext | nindent 8 }} | ||
serviceAccount: project-monitoring-patch-job | ||
volumes: | ||
- configMap: | ||
defaultMode: 0755 | ||
name: project-monitoring-patch-job | ||
name: project-monitoring-patch-job |
Oops, something went wrong.