mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-04-06 05:06:02 +00:00
Compare commits
9 Commits
v0.13.0
...
grafana-on
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cac2191ea | ||
|
|
b40e1b09cb | ||
|
|
93018c4035 | ||
|
|
b00621ee2a | ||
|
|
02a623b17d | ||
|
|
def2eb0f42 | ||
|
|
aa2f553281 | ||
|
|
36d88553ce | ||
|
|
9e33dc0651 |
@@ -24,24 +24,36 @@ resolved_miss_map=$(
|
||||
change_commit=$(git --no-pager blame -L"$line",+1 -- "$chart/Chart.yaml" | awk '{print $1}')
|
||||
|
||||
if [ "$change_commit" = "00000000" ]; then
|
||||
# Not commited yet, use previus commit
|
||||
# Not committed yet, use previous commit
|
||||
line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}')
|
||||
commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}')
|
||||
if [ $(echo $commit | cut -c1) = "^" ]; then
|
||||
# Previus commit not exists
|
||||
# Previous commit not exists
|
||||
commit=$(echo $commit | cut -c2-)
|
||||
fi
|
||||
else
|
||||
# Commited, but version_map wasn't updated
|
||||
# Committed, but version_map wasn't updated
|
||||
line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}')
|
||||
change_commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}')
|
||||
if [ $(echo $change_commit | cut -c1) = "^" ]; then
|
||||
# Previus commit not exists
|
||||
# Previous commit not exists
|
||||
commit=$(echo $change_commit | cut -c2-)
|
||||
else
|
||||
commit=$(git describe --always "$change_commit~1")
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if the commit belongs to the main branch
|
||||
if ! git merge-base --is-ancestor "$commit" main; then
|
||||
# Find the closest parent commit that belongs to main
|
||||
commit_in_main=$(git log --pretty=format:"%H" main -- "$chart/Chart.yaml" | head -n 1)
|
||||
if [ -n "$commit_in_main" ]; then
|
||||
commit="$commit_in_main"
|
||||
else
|
||||
# No valid commit found in main branch for $chart, skipping..."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
echo "$chart $version $commit"
|
||||
done
|
||||
|
||||
@@ -68,7 +68,7 @@ spec:
|
||||
serviceAccountName: cozystack
|
||||
containers:
|
||||
- name: cozystack
|
||||
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.13.0"
|
||||
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.14.0"
|
||||
env:
|
||||
- name: KUBERNETES_SERVICE_HOST
|
||||
value: localhost
|
||||
@@ -87,7 +87,7 @@ spec:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: darkhttpd
|
||||
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.13.0"
|
||||
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.14.0"
|
||||
command:
|
||||
- /usr/bin/darkhttpd
|
||||
- /cozystack/assets
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
|
||||
{{- $passwords := dict }}
|
||||
|
||||
{{- with (index $existingSecret "data") }}
|
||||
{{- range $k, $v := . }}
|
||||
{{- $_ := set $passwords $k (b64dec $v) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $user, $u := .Values.users }}
|
||||
{{- if $u.password }}
|
||||
{{- $_ := set $passwords $user $u.password }}
|
||||
{{- else if not (index $passwords $user) }}
|
||||
{{- $_ := set $passwords $user (randAlphaNum 16) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.users }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-credentials
|
||||
stringData:
|
||||
{{- range $user, $u := .Values.users }}
|
||||
{{ quote $user }}: {{ quote (index $passwords $user) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: "clickhouse.altinity.com/v1"
|
||||
kind: "ClickHouseInstallation"
|
||||
metadata:
|
||||
@@ -12,7 +41,7 @@ spec:
|
||||
{{- with .Values.users }}
|
||||
users:
|
||||
{{- range $name, $u := . }}
|
||||
{{ $name }}/password_sha256_hex: {{ sha256sum $u.password }}
|
||||
{{ $name }}/password_sha256_hex: {{ sha256sum (index $passwords $name) }}
|
||||
{{ $name }}/profile: {{ ternary "readonly" "default" (index $u "readonly" | default false) }}
|
||||
{{ $name }}/networks/ip: ["::/0"]
|
||||
{{- end }}
|
||||
@@ -31,7 +60,7 @@ spec:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
{{- with .Values.storageClass }}
|
||||
{{- with $.Values.storageClass }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
resources:
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-dashboard-resources
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
resourceNames:
|
||||
- chi-clickhouse-test-clickhouse-0-0
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}-credentials
|
||||
verbs: ["get", "list", "watch"]
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
19
packages/apps/ferretdb/templates/dashboard-resourcemap.yaml
Normal file
19
packages/apps/ferretdb/templates/dashboard-resourcemap.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-dashboard-resources
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}-credentials
|
||||
verbs: ["get", "list", "watch"]
|
||||
@@ -1,3 +1,30 @@
|
||||
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
|
||||
{{- $passwords := dict }}
|
||||
|
||||
{{- with (index $existingSecret "data") }}
|
||||
{{- range $k, $v := . }}
|
||||
{{- $_ := set $passwords $k (b64dec $v) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $user, $u := .Values.users }}
|
||||
{{- if $u.password }}
|
||||
{{- $_ := set $passwords $user $u.password }}
|
||||
{{- else if not (index $passwords $user) }}
|
||||
{{- $_ := set $passwords $user (randAlphaNum 16) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.users }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-credentials
|
||||
stringData:
|
||||
{{- range $user, $u := .Values.users }}
|
||||
{{ quote $user }}: {{ quote (index $passwords $user) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
@@ -13,7 +40,7 @@ stringData:
|
||||
{{- range $user, $u := .Values.users }}
|
||||
SELECT 'CREATE ROLE {{ $user }} LOGIN INHERIT;'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '{{ $user }}')\gexec
|
||||
ALTER ROLE {{ $user }} WITH PASSWORD '{{ $u.password }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
|
||||
ALTER ROLE {{ $user }} WITH PASSWORD '{{ index $passwords $user }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
|
||||
COMMENT ON ROLE {{ $user }} IS 'user managed by helm';
|
||||
{{- end }}
|
||||
EOT
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.4.0
|
||||
version: 0.5.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -79,7 +79,7 @@ more details:
|
||||
| Name | Description | Value |
|
||||
| ----------- | ----------------------- | ----- |
|
||||
| `users` | Users configuration | `{}` |
|
||||
| `databases` | Databases configuration | `[]` |
|
||||
| `databases` | Databases configuration | `{}` |
|
||||
|
||||
### Backup parameters
|
||||
|
||||
|
||||
20
packages/apps/mysql/templates/dashboard-resourcemap.yaml
Normal file
20
packages/apps/mysql/templates/dashboard-resourcemap.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-dashboard-resources
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}-primary
|
||||
- {{ .Release.Name }}-secondary
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}-credentials
|
||||
verbs: ["get", "list", "watch"]
|
||||
@@ -1,14 +1,47 @@
|
||||
{{- range $name := .Values.databases }}
|
||||
{{ $dnsName := replace "_" "-" $name }}
|
||||
{{- range $name, $db := .Values.databases }}
|
||||
{{ $dbDNSName := replace "_" "-" $name }}
|
||||
---
|
||||
apiVersion: k8s.mariadb.com/v1alpha1
|
||||
kind: Database
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ $dnsName }}
|
||||
name: {{ $.Release.Name }}-{{ $dbDNSName }}
|
||||
spec:
|
||||
name: {{ $name }}
|
||||
mariaDbRef:
|
||||
name: {{ $.Release.Name }}
|
||||
characterSet: utf8
|
||||
collate: utf8_general_ci
|
||||
{{- range $user := $db.roles.admin }}
|
||||
{{ $userDNSName := replace "_" "-" $user }}
|
||||
---
|
||||
apiVersion: k8s.mariadb.com/v1alpha1
|
||||
kind: Grant
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ $dbDNSName }}-{{ $userDNSName }}
|
||||
spec:
|
||||
mariaDbRef:
|
||||
name: {{ $.Release.Name }}
|
||||
privileges: ['ALL']
|
||||
database: {{ $name }}
|
||||
table: "*"
|
||||
username: {{ $user }}
|
||||
grantOption: true
|
||||
{{- end }}
|
||||
{{- range $user := $db.roles.readonly }}
|
||||
{{ $userDNSName := replace "_" "-" $user }}
|
||||
---
|
||||
apiVersion: k8s.mariadb.com/v1alpha1
|
||||
kind: Grant
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ $dbDNSName }}-{{ $userDNSName }}
|
||||
spec:
|
||||
mariaDbRef:
|
||||
name: {{ $.Release.Name }}
|
||||
privileges: ['SELECT']
|
||||
database: {{ $name }}
|
||||
table: "*"
|
||||
username: {{ $user }}
|
||||
grantOption: true
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
@@ -4,11 +4,9 @@ kind: MariaDB
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
spec:
|
||||
{{- if (and .Values.users.root .Values.users.root.password) }}
|
||||
rootPasswordSecretKeyRef:
|
||||
name: {{ .Release.Name }}
|
||||
key: root-password
|
||||
{{- end }}
|
||||
name: {{ .Release.Name }}-credentials
|
||||
key: root
|
||||
|
||||
image: "mariadb:11.0.2"
|
||||
|
||||
|
||||
@@ -1,9 +1,31 @@
|
||||
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
|
||||
{{- $passwords := dict }}
|
||||
|
||||
{{- with (index $existingSecret "data") }}
|
||||
{{- range $k, $v := . }}
|
||||
{{- $_ := set $passwords $k (b64dec $v) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $usersWithRoot := .Values.users }}
|
||||
{{- if (and .Values.users.root .Values.users.root.password) }}
|
||||
{{- $_ := set $usersWithRoot "root" dict }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $user, $u := $usersWithRoot }}
|
||||
{{- if $u.password }}
|
||||
{{- $_ := set $passwords $user $u.password }}
|
||||
{{- else if not (index $passwords $user) }}
|
||||
{{- $_ := set $passwords $user (randAlphaNum 16) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
name: {{ .Release.Name }}-credentials
|
||||
stringData:
|
||||
{{- range $name, $u := .Values.users }}
|
||||
{{ $name }}-password: {{ $u.password }}
|
||||
{{- range $name, $u := $usersWithRoot }}
|
||||
{{ $name }}: {{ index $passwords $name }}
|
||||
{{- end }}
|
||||
|
||||
@@ -11,21 +11,8 @@ spec:
|
||||
mariaDbRef:
|
||||
name: {{ $.Release.Name }}
|
||||
passwordSecretKeyRef:
|
||||
name: {{ $.Release.Name }}
|
||||
key: {{ $name }}-password
|
||||
name: {{ $.Release.Name }}-credentials
|
||||
key: {{ $name }}
|
||||
maxUserConnections: {{ $u.maxUserConnections }}
|
||||
---
|
||||
apiVersion: k8s.mariadb.com/v1alpha1
|
||||
kind: Grant
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ $dnsName }}
|
||||
spec:
|
||||
mariaDbRef:
|
||||
name: {{ $.Release.Name }}
|
||||
privileges: {{ $u.privileges | toJson }}
|
||||
database: "*"
|
||||
table: "*"
|
||||
username: {{ $name }}
|
||||
grantOption: true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
"description": "StorageClass used to store the data",
|
||||
"default": ""
|
||||
},
|
||||
"databases": {
|
||||
"type": "array",
|
||||
"description": "Databases configuration",
|
||||
"default": [],
|
||||
"items": {}
|
||||
},
|
||||
"backup": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -15,27 +15,25 @@ storageClass: ""
|
||||
## @param users [object] Users configuration
|
||||
## Example:
|
||||
## users:
|
||||
## root:
|
||||
## password: strongpassword
|
||||
## user1:
|
||||
## privileges: ['ALL']
|
||||
## maxUserConnections: 1000
|
||||
## password: hackme
|
||||
## user2:
|
||||
## privileges: ['SELECT']
|
||||
## maxUserConnections: 1000
|
||||
## password: hackme
|
||||
##
|
||||
users: {}
|
||||
|
||||
## @param databases Databases configuration
|
||||
## @param databases [object] Databases configuration
|
||||
## Example:
|
||||
## databases:
|
||||
## - wordpress1
|
||||
## - wordpress2
|
||||
## - wordpress3
|
||||
## - wordpress4
|
||||
databases: []
|
||||
## myapp1:
|
||||
## roles:
|
||||
## admin:
|
||||
## - user1
|
||||
## readonly:
|
||||
## - user2
|
||||
databases: {}
|
||||
|
||||
## @section Backup parameters
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.5.0
|
||||
version: 0.6.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -8,7 +8,14 @@ rules:
|
||||
resources:
|
||||
- services
|
||||
resourceNames:
|
||||
- postgres-service-r
|
||||
- postgres-service-ro
|
||||
- postgres-service-rw
|
||||
- {{ .Release.Name }}-r
|
||||
- {{ .Release.Name }}-ro
|
||||
- {{ .Release.Name }}-rw
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}-credentials
|
||||
verbs: ["get", "list", "watch"]
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
|
||||
{{- $passwords := dict }}
|
||||
|
||||
{{- with (index $existingSecret "data") }}
|
||||
{{- range $k, $v := . }}
|
||||
{{- $_ := set $passwords $k (b64dec $v) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $user, $u := .Values.users }}
|
||||
{{- if $u.password }}
|
||||
{{- $_ := set $passwords $user $u.password }}
|
||||
{{- else if not (index $passwords $user) }}
|
||||
{{- $_ := set $passwords $user (randAlphaNum 16) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.users }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-credentials
|
||||
stringData:
|
||||
{{- range $user, $u := .Values.users }}
|
||||
{{ quote $user }}: {{ quote (index $passwords $user) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
@@ -13,7 +40,7 @@ stringData:
|
||||
{{- range $user, $u := .Values.users }}
|
||||
SELECT 'CREATE ROLE {{ $user }} LOGIN INHERIT;'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '{{ $user }}')\gexec
|
||||
ALTER ROLE {{ $user }} WITH PASSWORD '{{ $u.password }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
|
||||
ALTER ROLE {{ $user }} WITH PASSWORD '{{ index $passwords $user }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
|
||||
COMMENT ON ROLE {{ $user }} IS 'user managed by helm';
|
||||
{{- end }}
|
||||
EOT
|
||||
|
||||
@@ -16,10 +16,10 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "3.12.2"
|
||||
appVersion: "3.13.2"
|
||||
|
||||
@@ -19,3 +19,10 @@ The service utilizes official RabbitMQ operator. This ensures the reliability an
|
||||
| `size` | Persistent Volume size | `10Gi` |
|
||||
| `replicas` | Number of RabbitMQ replicas | `3` |
|
||||
| `storageClass` | StorageClass used to store the data | `""` |
|
||||
|
||||
### Configuration parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| -------- | --------------------------- | ----- |
|
||||
| `users` | Users configuration | `{}` |
|
||||
| `vhosts` | Virtual Hosts configuration | `{}` |
|
||||
|
||||
22
packages/apps/rabbitmq/templates/dashboard-resourcemap.yaml
Normal file
22
packages/apps/rabbitmq/templates/dashboard-resourcemap.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-dashboard-resources
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}-default-user
|
||||
{{- range $name, $u := .Values.users }}
|
||||
- {{ $.Release.Name }}-{{ kebabcase $name }}-credentials
|
||||
{{- end }}
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}
|
||||
verbs: ["get", "list", "watch"]
|
||||
@@ -17,3 +17,81 @@ spec:
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
storage: {{ .Values.size }}
|
||||
|
||||
{{- range $user, $u := .Values.users }}
|
||||
|
||||
{{- $password := $u.password }}
|
||||
{{- if not $password }}
|
||||
{{- with (dig "data" "password" "" (lookup "v1" "Secret" $.Release.Namespace (printf "%s-%s-credentials" $.Release.Name (kebabcase $user)))) }}
|
||||
{{- $password = b64dec . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not $password }}
|
||||
{{- $password = (randAlphaNum 16) }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: rabbitmq.com/v1beta1
|
||||
kind: User
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ kebabcase $user }}
|
||||
annotations:
|
||||
config: '{{ printf "%s %s" $user $password | sha256sum }}'
|
||||
spec:
|
||||
importCredentialsSecret:
|
||||
name: {{ $.Release.Name }}-{{ $user }}-credentials
|
||||
rabbitmqClusterReference:
|
||||
name: {{ $.Release.Name }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ kebabcase $user }}-credentials
|
||||
type: Opaque
|
||||
stringData:
|
||||
username: {{ $user }}
|
||||
password: {{ $password }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $host, $h := .Values.vhosts }}
|
||||
---
|
||||
apiVersion: rabbitmq.com/v1beta1
|
||||
kind: Vhost
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ kebabcase $host }}
|
||||
spec:
|
||||
name: {{ $host }}
|
||||
rabbitmqClusterReference:
|
||||
name: {{ $.Release.Name }}
|
||||
{{- range $user := $h.roles.admin }}
|
||||
---
|
||||
apiVersion: rabbitmq.com/v1beta1
|
||||
kind: Permission
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ kebabcase $host }}-{{ kebabcase $user }}
|
||||
spec:
|
||||
vhost: "{{ $host }}"
|
||||
user: "{{ $user }}"
|
||||
permissions:
|
||||
write: ".*"
|
||||
configure: ".*"
|
||||
read: ".*"
|
||||
rabbitmqClusterReference:
|
||||
name: {{ $.Release.Name }}
|
||||
{{- end }}
|
||||
{{- range $user := $h.roles.readonly }}
|
||||
---
|
||||
apiVersion: rabbitmq.com/v1beta1
|
||||
kind: Permission
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-{{ kebabcase $host }}-{{ kebabcase $user }}
|
||||
spec:
|
||||
vhost: "{{ $host }}"
|
||||
user: "{{ $user }}"
|
||||
permissions:
|
||||
read: ".*"
|
||||
rabbitmqClusterReference:
|
||||
name: {{ $.Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
"type": "string",
|
||||
"description": "StorageClass used to store the data",
|
||||
"default": ""
|
||||
},
|
||||
"vhosts": {
|
||||
"type": "object",
|
||||
"description": "Virtual Hosts configuration",
|
||||
"default": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,3 +9,33 @@ external: false
|
||||
size: 10Gi
|
||||
replicas: 3
|
||||
storageClass: ""
|
||||
|
||||
## @section Configuration parameters
|
||||
|
||||
## @param users [object] Users configuration
|
||||
## Example:
|
||||
## users:
|
||||
## user1:
|
||||
## password: strongpassword
|
||||
## user2:
|
||||
## password: hackme
|
||||
## user3:
|
||||
## password: testtest
|
||||
##
|
||||
users: {}
|
||||
|
||||
## @param vhosts Virtual Hosts configuration
|
||||
## Example:
|
||||
## vhosts:
|
||||
## myapp:
|
||||
## roles:
|
||||
## admin:
|
||||
## - user1
|
||||
## - user2
|
||||
## readonly:
|
||||
## - user3
|
||||
## test:
|
||||
## roles:
|
||||
## admin:
|
||||
## - user3
|
||||
vhosts: {}
|
||||
|
||||
@@ -2,11 +2,13 @@ bucket 0.1.0 HEAD
|
||||
clickhouse 0.1.0 ca79f72
|
||||
clickhouse 0.2.0 7cd7de73
|
||||
clickhouse 0.2.1 5ca8823
|
||||
clickhouse 0.3.0 HEAD
|
||||
clickhouse 0.3.0 b00621e
|
||||
clickhouse 0.4.0 HEAD
|
||||
ferretdb 0.1.0 4ffa8615
|
||||
ferretdb 0.1.1 5ca8823
|
||||
ferretdb 0.2.0 adaf603
|
||||
ferretdb 0.3.0 HEAD
|
||||
ferretdb 0.3.0 aa2f553
|
||||
ferretdb 0.4.0 HEAD
|
||||
http-cache 0.1.0 a956713
|
||||
http-cache 0.2.0 5ca8823
|
||||
http-cache 0.3.0 HEAD
|
||||
@@ -31,7 +33,8 @@ kubernetes 0.10.0 HEAD
|
||||
mysql 0.1.0 f642698
|
||||
mysql 0.2.0 8b975ff0
|
||||
mysql 0.3.0 5ca8823
|
||||
mysql 0.4.0 HEAD
|
||||
mysql 0.4.0 93018c4
|
||||
mysql 0.5.0 HEAD
|
||||
nats 0.1.0 5ca8823
|
||||
nats 0.2.0 HEAD
|
||||
postgres 0.1.0 f642698
|
||||
@@ -40,10 +43,12 @@ postgres 0.2.1 4a97e297
|
||||
postgres 0.3.0 995dea6f
|
||||
postgres 0.4.0 ec283c33
|
||||
postgres 0.4.1 5ca8823
|
||||
postgres 0.5.0 HEAD
|
||||
postgres 0.5.0 c07c4bbd
|
||||
postgres 0.6.0 HEAD
|
||||
rabbitmq 0.1.0 f642698
|
||||
rabbitmq 0.2.0 5ca8823
|
||||
rabbitmq 0.3.0 HEAD
|
||||
rabbitmq 0.3.0 9e33dc0
|
||||
rabbitmq 0.4.0 HEAD
|
||||
redis 0.1.1 f642698
|
||||
redis 0.2.0 5ca8823
|
||||
redis 0.3.0 HEAD
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
cozystack:
|
||||
image: ghcr.io/aenix-io/cozystack/cozystack:v0.13.0@sha256:0943f277c63f20cea19bef0207dc47f47157b58309c09af18830aac7906d1416
|
||||
image: ghcr.io/aenix-io/cozystack/cozystack:v0.14.0@sha256:5a0269683feb4fff24e9044a41453dbedbc857ad450102b275e1d05aa3aec081
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
e2e:
|
||||
image: ghcr.io/aenix-io/cozystack/e2e-sandbox:v0.13.0@sha256:be1693c8ce6a9522499f79b1e42b2e08c7ca80405026a095299e5e990a3ab791
|
||||
image: ghcr.io/aenix-io/cozystack/e2e-sandbox:v0.14.0@sha256:be1693c8ce6a9522499f79b1e42b2e08c7ca80405026a095299e5e990a3ab791
|
||||
|
||||
@@ -56,7 +56,7 @@ spec:
|
||||
mountPath: /var/lib/grafana
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:10.1.0
|
||||
image: grafana/grafana:11.2.0
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: false
|
||||
@@ -64,7 +64,7 @@ spec:
|
||||
failureThreshold: 3
|
||||
env:
|
||||
- name: GF_INSTALL_PLUGINS
|
||||
value: grafana-worldmap-panel,flant-statusmap-panel,grafana-oncall-app,natel-discrete-panel
|
||||
value: grafana-worldmap-panel,flant-statusmap-panel,grafana-oncall-app,natel-discrete-panel,grafana-oncall-app
|
||||
- name: ONCALL_API_URL
|
||||
value: http://grafana-oncall-engine:8080
|
||||
- name: GF_DATABASE_HOST
|
||||
@@ -87,6 +87,13 @@ spec:
|
||||
secretKeyRef:
|
||||
key: password
|
||||
name: grafana-admin-password
|
||||
volumeMounts:
|
||||
- name: grafana-plugins
|
||||
mountPath: /usr/share/grafana/conf/provisioning/plugins/
|
||||
volumes:
|
||||
- name: grafana-plugins
|
||||
configMap:
|
||||
name: grafana-plugins-provisioning
|
||||
ingress:
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -109,3 +116,20 @@ spec:
|
||||
- hosts:
|
||||
- "{{ .Values.host | default (printf "grafana.%s" $host) }}"
|
||||
secretName: grafana-ingress-tls
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-plugins-provisioning
|
||||
data:
|
||||
on-call.yaml: |
|
||||
apiVersion: 1
|
||||
apps:
|
||||
- type: grafana-oncall-app
|
||||
name: grafana-oncall-app
|
||||
version: v1.9.0
|
||||
disabled: false
|
||||
jsonData:
|
||||
grafanaUrl: "https://grafana.infra.aenix.org"
|
||||
license: "OpenSource"
|
||||
onCallApiUrl: "http://grafana-oncall-engine:8080"
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
oncall:
|
||||
fullnameOverride: grafana-oncall
|
||||
externalGrafana:
|
||||
url: "https://{{ .Values.host | default (printf "grafana.%s" $host) }}/"
|
||||
url: "http://grafana-service:3000"
|
||||
|
||||
externalPostgresql:
|
||||
host: grafana-oncall-db-rw
|
||||
@@ -35,6 +35,6 @@ spec:
|
||||
|
||||
externalRedis:
|
||||
host: rfrm-grafana-oncall
|
||||
existingSecret: {{ .Release.Name }}-oncall-redis-password
|
||||
existingSecret: grafana-oncall-redis-password
|
||||
passwordKey: password
|
||||
{{- end }}
|
||||
|
||||
@@ -18,7 +18,7 @@ stringData:
|
||||
receivers:
|
||||
- name: 'webhook'
|
||||
webhook_configs:
|
||||
- url: http://{{ .Release.Name }}-oncall-engine.{{ .Release.Namespace }}.svc:8080/integrations/v1/alertmanager/Kjb2NWxxSlgGtxz9F4ihovQBB/
|
||||
- url: http://grafana-oncall-engine:8080/integrations/v1/alertmanager/fD8cZuXGPvDyQSNYbUwJgHB6H/
|
||||
---
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMAlertmanager
|
||||
|
||||
@@ -50,7 +50,7 @@ spec:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.host | default (printf "seaweedfs.%s" $host) }}
|
||||
- {{ .Values.host | default (printf "s3.%s" $host) }}
|
||||
secretName: {{ .Release.Name }}-s3-ingress-tls
|
||||
|
||||
cosi:
|
||||
|
||||
@@ -33,11 +33,11 @@ kubeapps:
|
||||
image:
|
||||
registry: ghcr.io/aenix-io/cozystack
|
||||
repository: dashboard
|
||||
tag: v0.13.0
|
||||
tag: v0.14.0
|
||||
digest: "sha256:4818712e9fc9c57cc321512760c3226af564a04e69d4b3ec9229ab91fd39abeb"
|
||||
kubeappsapis:
|
||||
image:
|
||||
registry: ghcr.io/aenix-io/cozystack
|
||||
repository: kubeapps-apis
|
||||
tag: v0.13.0
|
||||
digest: "sha256:a8cf2b536573f4bc29d4dce323ef3007a65567d6f1fe7803490bd71f422aca88"
|
||||
tag: v0.14.0
|
||||
digest: "sha256:7918268647b8f4862f312df9ba42e9edfd2f703223259e2e8b9e02da1ad71cc4"
|
||||
|
||||
@@ -24,4 +24,4 @@ dependencies:
|
||||
repository: https://prometheus-community.github.io/helm-charts
|
||||
version: 25.8.2
|
||||
digest: sha256:edc9fef449a694cd319135e37ac84f8247ac9ad0c48ac86099dae4e428beb7b7
|
||||
generated: "2024-01-26T17:54:48.132209769Z"
|
||||
generated: "2024-09-04T18:52:49.709787897Z"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
appVersion: v1.3.94
|
||||
appVersion: v1.9.22
|
||||
dependencies:
|
||||
- condition: cert-manager.enabled
|
||||
name: cert-manager
|
||||
@@ -36,4 +36,4 @@ dependencies:
|
||||
description: Developer-friendly incident response with brilliant Slack integration
|
||||
name: oncall
|
||||
type: application
|
||||
version: 1.3.94
|
||||
version: 1.9.22
|
||||
|
||||
@@ -65,8 +65,6 @@
|
||||
- name: FEATURE_SLACK_INTEGRATION_ENABLED
|
||||
value: {{ .Values.oncall.slack.enabled | toString | title | quote }}
|
||||
{{- if .Values.oncall.slack.enabled }}
|
||||
- name: SLACK_SLASH_COMMAND_NAME
|
||||
value: "/{{ .Values.oncall.slack.commandName | default "oncall" }}"
|
||||
{{- if .Values.oncall.slack.existingSecret }}
|
||||
- name: SLACK_CLIENT_OAUTH_ID
|
||||
valueFrom:
|
||||
@@ -603,6 +601,13 @@ when broker.type != rabbitmq, we do not need to include rabbitmq environment var
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.smtp.env" -}}
|
||||
{{- $smtpTLS:=.Values.oncall.smtp.tls | default true | toString | title | quote }}
|
||||
{{- $smtpSSL:=.Values.oncall.smtp.ssl | default false | toString | title | quote }}
|
||||
{{- if eq $smtpTLS "\"True\"" }}
|
||||
{{- if eq $smtpSSL "\"True\"" }}
|
||||
{{- fail "cannot set Email (SMTP) to use SSL and TLS at the same time" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: FEATURE_EMAIL_INTEGRATION_ENABLED
|
||||
value: {{ .Values.oncall.smtp.enabled | toString | title | quote }}
|
||||
{{- if .Values.oncall.smtp.enabled }}
|
||||
@@ -619,7 +624,9 @@ when broker.type != rabbitmq, we do not need to include rabbitmq environment var
|
||||
key: smtp-password
|
||||
optional: true
|
||||
- name: EMAIL_USE_TLS
|
||||
value: {{ .Values.oncall.smtp.tls | default true | toString | title | quote }}
|
||||
value: {{ $smtpTLS }}
|
||||
- name: EMAIL_USE_SSL
|
||||
value: {{ $smtpSSL }}
|
||||
- name: EMAIL_FROM_ADDRESS
|
||||
value: {{ .Values.oncall.smtp.fromEmail | quote }}
|
||||
- name: EMAIL_NOTIFICATIONS_LIMIT
|
||||
|
||||
@@ -12,8 +12,8 @@ metadata:
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{ include "snippet.oncall.secret.secretKey" . }}: {{ randAlphaNum 40 | b64enc | quote }}
|
||||
{{ include "snippet.oncall.secret.mirageSecretKey" . }}: {{ randAlphaNum 40 | b64enc | quote }}
|
||||
{{ include "snippet.oncall.secret.secretKey" . }}: {{ (.Values.oncall.secrets.secretKey | default (randAlphaNum 40)) | b64enc | quote }}
|
||||
{{ include "snippet.oncall.secret.mirageSecretKey" . }}: {{ (.Values.oncall.secrets.mirageSecretKey | default (randAlphaNum 40)) | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.database.type "mysql") (not .Values.mariadb.enabled) (not .Values.externalMysql.existingSecret) }}
|
||||
@@ -46,7 +46,7 @@ data:
|
||||
postgres-password: {{ required "externalPostgresql.password is required if not postgresql.enabled and not externalPostgresql.existingSecret" .Values.externalPostgresql.password | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.broker.type "rabbitmq") (not .Values.rabbitmq.enabled) (not .Values.externalRabbitmq.existingSecret) }}
|
||||
{{- if and (eq .Values.broker.type "rabbitmq") (.Values.externalRabbitmq.password) (not .Values.rabbitmq.enabled) (not .Values.externalRabbitmq.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
@@ -61,7 +61,7 @@ data:
|
||||
rabbitmq-password: {{ required "externalRabbitmq.password is required if not rabbitmq.enabled and not externalRabbitmq.existingSecret" .Values.externalRabbitmq.password | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.broker.type "redis") (not .Values.redis.enabled) (not .Values.externalRedis.existingSecret) }}
|
||||
{{- if and (.Values.externalRedis.host) (not .Values.redis.enabled) (not .Values.externalRedis.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
||||
@@ -176,7 +176,7 @@ detached_integrations:
|
||||
# Celery workers pods configuration
|
||||
celery:
|
||||
replicaCount: 1
|
||||
worker_queue: "default,critical,long,slack,telegram,webhook,celery,grafana"
|
||||
worker_queue: "default,critical,long,slack,telegram,webhook,celery,grafana,retry"
|
||||
worker_concurrency: "1"
|
||||
worker_max_tasks_per_child: "100"
|
||||
worker_beat_enabled: "True"
|
||||
@@ -305,8 +305,6 @@ oncall:
|
||||
slack:
|
||||
# Enable the Slack ChatOps integration for the Oncall Engine.
|
||||
enabled: false
|
||||
# Sets the Slack bot slash-command
|
||||
commandName: oncall
|
||||
# clientId configures the Slack app OAuth2 client ID.
|
||||
# api.slack.com/apps/<yourApp> -> Basic Information -> App Credentials -> Client ID
|
||||
clientId: ~
|
||||
@@ -343,6 +341,7 @@ oncall:
|
||||
username: ~
|
||||
password: ~
|
||||
tls: ~
|
||||
ssl: ~
|
||||
fromEmail: ~
|
||||
exporter:
|
||||
enabled: false
|
||||
|
||||
@@ -15,10 +15,10 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.2
|
||||
version: 0.3.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "v5.6.0"
|
||||
appVersion: "v5.12.0"
|
||||
|
||||
@@ -7,18 +7,45 @@ linkTitle: "Helm installation"
|
||||
|
||||
[grafana-operator](https://github.com/grafana/grafana-operator) for Kubernetes to manage Grafana instances and grafana resources.
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
## Installation
|
||||
|
||||
This is a OCI helm chart, helm started support OCI in version 3.8.0.
|
||||
|
||||
```shell
|
||||
helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-operator --version v5.6.0
|
||||
helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-operator --version v5.12.0
|
||||
```
|
||||
|
||||
Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000).
|
||||
|
||||
### Using Terraform
|
||||
|
||||
To install the helm chart using terraform, make sure you use the right values for `repository` and `name` as shown below:
|
||||
|
||||
```hcl
|
||||
resource "helm_release" "grafana_kubernetes_operator" {
|
||||
name = "grafana-operator"
|
||||
namespace = "default"
|
||||
repository = "oci://ghcr.io/grafana/helm-charts"
|
||||
chart = "grafana-operator"
|
||||
verify = false
|
||||
version = "v5.12.0"
|
||||
}
|
||||
```
|
||||
|
||||
## Upgrading
|
||||
|
||||
Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions.
|
||||
To avoid issues due to outdated or missing definitions, run the following command before updating an existing installation:
|
||||
|
||||
```shell
|
||||
kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/v5.12.0/crds.yaml
|
||||
```
|
||||
|
||||
The `--server-side` and `--force-conflict` flags are required to avoid running into issues with the `kubectl.kubernetes.io/last-applied-configuration` annotation.
|
||||
By using server side apply, this annotation is not considered. `--force-conflict` allows kubectl to modify fields previously managed by helm.
|
||||
|
||||
## Development
|
||||
|
||||
For general and helm specific development instructions please read the [CONTRIBUTING.md](../../../CONTRIBUTING.md)
|
||||
@@ -38,24 +65,39 @@ It's easier to just manage this configuration outside of the operator.
|
||||
| additionalLabels | object | `{}` | additional labels to add to all resources |
|
||||
| affinity | object | `{}` | pod affinity |
|
||||
| env | list | `[]` | Additional environment variables |
|
||||
| fullnameOverride | string | `""` | |
|
||||
| extraObjects | list | `[]` | Array of extra K8s objects to deploy |
|
||||
| fullnameOverride | string | `""` | Overrides the fully qualified app name. |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | The image pull policy to use in grafana operator container |
|
||||
| image.repository | string | `"ghcr.io/grafana/grafana-operator"` | grafana operator image repository |
|
||||
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
|
||||
| imagePullSecrets | list | `[]` | image pull secrets |
|
||||
| isOpenShift | bool | `false` | Determines if the target cluster is OpenShift. Additional rbac permissions for routes will be added on OpenShift |
|
||||
| leaderElect | bool | `false` | If you want to run multiple replicas of the grafana-operator, this is not recommended. |
|
||||
| metricsService.metricsPort | int | `9090` | metrics service port |
|
||||
| metricsService.pprofPort | int | `8888` | port for the pprof profiling endpoint |
|
||||
| metricsService.type | string | `"ClusterIP"` | metrics service type |
|
||||
| nameOverride | string | `""` | |
|
||||
| nameOverride | string | `""` | Overrides the name of the chart. |
|
||||
| namespaceOverride | string | `""` | Overrides the namespace name. |
|
||||
| namespaceScope | bool | `false` | If the operator should run in namespace-scope or not, if true the operator will only be able to manage instances in the same namespace |
|
||||
| nodeSelector | object | `{}` | pod node selector |
|
||||
| podAnnotations | object | `{}` | pod annotations |
|
||||
| podSecurityContext | object | `{}` | pod security context |
|
||||
| priorityClassName | string | `""` | pod priority class name |
|
||||
| rbac.create | bool | `true` | Specifies whether to create the ClusterRole and ClusterRoleBinding. If "namespaceScope" is true or "watchNamespaces" is set, this will create Role and RoleBinding instead. |
|
||||
| resources | object | `{}` | grafana operator container resources |
|
||||
| securityContext | object | `{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true}` | grafana operator container security context |
|
||||
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
|
||||
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
|
||||
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
|
||||
| serviceMonitor | object | `{"additionalLabels":{},"enabled":false,"interval":"1m","metricRelabelings":[],"relabelings":[],"scrapeTimeout":"10s","targetLabels":[],"telemetryPath":"/metrics"}` | Enable this to use with Prometheus Operator |
|
||||
| serviceMonitor.additionalLabels | object | `{}` | Set of labels to transfer from the Kubernetes Service onto the target |
|
||||
| serviceMonitor.enabled | bool | `false` | When set true then use a ServiceMonitor to configure scraping |
|
||||
| serviceMonitor.interval | string | `"1m"` | Set how frequently Prometheus should scrape |
|
||||
| serviceMonitor.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion |
|
||||
| serviceMonitor.relabelings | list | `[]` | Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config |
|
||||
| serviceMonitor.scrapeTimeout | string | `"10s"` | Set timeout for scrape |
|
||||
| serviceMonitor.targetLabels | list | `[]` | Set of labels to transfer from the Kubernetes Service onto the target |
|
||||
| serviceMonitor.telemetryPath | string | `"/metrics"` | Set path to metrics path |
|
||||
| tolerations | list | `[]` | pod tolerations |
|
||||
| watchNamespaceSelector | string | `""` | Sets the WATCH_NAMESPACE_SELECTOR environment variable, it defines which namespaces the operator should be listening for based on label and key value pair added on namespace kind. By default it's all namespaces. |
|
||||
| watchNamespaces | string | `""` | Sets the WATCH_NAMESPACE environment variable, it defines which namespaces the operator should be listening for. By default it's all namespaces, if you only want to listen for the same namespace as the operator is deployed to look at namespaceScope. |
|
||||
|
||||
@@ -19,6 +19,34 @@ helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-opera
|
||||
|
||||
Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000).
|
||||
|
||||
### Using Terraform
|
||||
|
||||
To install the helm chart using terraform, make sure you use the right values for `repository` and `name` as shown below:
|
||||
|
||||
```hcl
|
||||
resource "helm_release" "grafana_kubernetes_operator" {
|
||||
name = "grafana-operator"
|
||||
namespace = "default"
|
||||
repository = "oci://ghcr.io/grafana/helm-charts"
|
||||
chart = "grafana-operator"
|
||||
verify = false
|
||||
version = "{{ template "chart.appVersion" . }}"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Upgrading
|
||||
|
||||
Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions.
|
||||
To avoid issues due to outdated or missing definitions, run the following command before updating an existing installation:
|
||||
|
||||
```shell
|
||||
kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/{{ template "chart.appVersion" . }}/crds.yaml
|
||||
```
|
||||
|
||||
The `--server-side` and `--force-conflict` flags are required to avoid running into issues with the `kubectl.kubernetes.io/last-applied-configuration` annotation.
|
||||
By using server side apply, this annotation is not considered. `--force-conflict` allows kubectl to modify fields previously managed by helm.
|
||||
|
||||
## Development
|
||||
|
||||
For general and helm specific development instructions please read the [CONTRIBUTING.md](../../../CONTRIBUTING.md)
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanaalertrulegroups.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaAlertRuleGroup
|
||||
listKind: GrafanaAlertRuleGroupList
|
||||
plural: grafanaalertrulegroups
|
||||
singular: grafanaalertrulegroup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaAlertRuleGroup is the Schema for the grafanaalertrulegroups
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaAlertRuleGroupSpec defines the desired state of GrafanaAlertRuleGroup
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
type: boolean
|
||||
folderRef:
|
||||
description: Match GrafanaFolders CRs to infer the uid
|
||||
type: string
|
||||
folderUID:
|
||||
description: |-
|
||||
UID of the folder containing this rule group
|
||||
Overrides the FolderSelector
|
||||
type: string
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
interval:
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
rules:
|
||||
items:
|
||||
description: AlertRule defines a specific rule to be evaluated.
|
||||
It is based on the upstream model with some k8s specific type
|
||||
mappings
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
condition:
|
||||
type: string
|
||||
data:
|
||||
items:
|
||||
properties:
|
||||
datasourceUid:
|
||||
description: Grafana data source unique identifier; it
|
||||
should be '__expr__' for a Server Side Expression operation.
|
||||
type: string
|
||||
model:
|
||||
description: JSON is the raw JSON query and includes the
|
||||
above properties as well as custom properties.
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
queryType:
|
||||
description: |-
|
||||
QueryType is an optional identifier for the type of query.
|
||||
It can be used to distinguish different types of queries.
|
||||
type: string
|
||||
refId:
|
||||
description: RefID is the unique identifier of the query,
|
||||
set by the frontend call.
|
||||
type: string
|
||||
relativeTimeRange:
|
||||
description: relative time range
|
||||
properties:
|
||||
from:
|
||||
description: from
|
||||
format: int64
|
||||
type: integer
|
||||
to:
|
||||
description: to
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
execErrState:
|
||||
enum:
|
||||
- OK
|
||||
- Alerting
|
||||
- Error
|
||||
- KeepLast
|
||||
type: string
|
||||
for:
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
isPaused:
|
||||
type: boolean
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
noDataState:
|
||||
enum:
|
||||
- Alerting
|
||||
- NoData
|
||||
- OK
|
||||
- KeepLast
|
||||
type: string
|
||||
notificationSettings:
|
||||
properties:
|
||||
group_by:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
group_interval:
|
||||
type: string
|
||||
group_wait:
|
||||
type: string
|
||||
mute_time_intervals:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
receiver:
|
||||
type: string
|
||||
repeat_interval:
|
||||
type: string
|
||||
required:
|
||||
- receiver
|
||||
type: object
|
||||
title:
|
||||
example: Always firing
|
||||
maxLength: 190
|
||||
minLength: 1
|
||||
type: string
|
||||
uid:
|
||||
pattern: ^[a-zA-Z0-9-_]+$
|
||||
type: string
|
||||
required:
|
||||
- condition
|
||||
- data
|
||||
- execErrState
|
||||
- for
|
||||
- noDataState
|
||||
- title
|
||||
- uid
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- instanceSelector
|
||||
- interval
|
||||
- rules
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of FolderUID or FolderRef can be set
|
||||
rule: (has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef)
|
||||
&& !(has(self.folderUID)))
|
||||
status:
|
||||
description: GrafanaAlertRuleGroupStatus defines the observed state of
|
||||
GrafanaAlertRuleGroup
|
||||
properties:
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -0,0 +1,219 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanacontactpoints.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaContactPoint
|
||||
listKind: GrafanaContactPointList
|
||||
plural: grafanacontactpoints
|
||||
singular: grafanacontactpoint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaContactPoint is the Schema for the grafanacontactpoints
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaContactPointSpec defines the desired state of GrafanaContactPoint
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
type: boolean
|
||||
disableResolveMessage:
|
||||
type: boolean
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
name:
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
settings:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type:
|
||||
enum:
|
||||
- alertmanager
|
||||
- prometheus-alertmanager
|
||||
- dingding
|
||||
- discord
|
||||
- email
|
||||
- googlechat
|
||||
- kafka
|
||||
- line
|
||||
- opsgenie
|
||||
- pagerduty
|
||||
- pushover
|
||||
- sensugo
|
||||
- sensu
|
||||
- slack
|
||||
- teams
|
||||
- telegram
|
||||
- threema
|
||||
- victorops
|
||||
- webhook
|
||||
- wecom
|
||||
- hipchat
|
||||
- oncall
|
||||
type: string
|
||||
required:
|
||||
- instanceSelector
|
||||
- name
|
||||
- settings
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaContactPointStatus defines the observed state of GrafanaContactPoint
|
||||
properties:
|
||||
conditions:
|
||||
description: |-
|
||||
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.12.0
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanadashboards.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
@@ -28,32 +28,62 @@ spec:
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaDashboard is the Schema for the grafanadashboards API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaDashboardSpec defines the desired state of GrafanaDashboard
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
configMapRef:
|
||||
description: dashboard from configmap
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key must be
|
||||
defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
contentCacheDuration:
|
||||
description: Cache duration for dashboards fetched from URLs
|
||||
type: string
|
||||
datasources:
|
||||
description: maps required data sources to existing ones
|
||||
items:
|
||||
properties:
|
||||
datasourceName:
|
||||
@@ -66,27 +96,55 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
envFrom:
|
||||
description: environments variables from secrets or config maps
|
||||
items:
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
@@ -95,33 +153,64 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
envs:
|
||||
description: environments variables as a map
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
value:
|
||||
description: Inline evn value
|
||||
type: string
|
||||
valueFrom:
|
||||
description: Reference on value source, might be the reference
|
||||
on a secret or config map
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key
|
||||
must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
@@ -133,8 +222,16 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
folder:
|
||||
description: folder assignment for dashboard
|
||||
type: string
|
||||
folderRef:
|
||||
description: Name of a `GrafanaFolder` resource in the same namespace
|
||||
type: string
|
||||
folderUID:
|
||||
description: UID of the target folder for this dashboard
|
||||
type: string
|
||||
grafanaCom:
|
||||
description: grafana.com/dashboards
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
@@ -144,37 +241,67 @@ spec:
|
||||
- id
|
||||
type: object
|
||||
gzipJson:
|
||||
description: GzipJson the dashboard's JSON compressed with Gzip. Base64-encoded
|
||||
when in YAML.
|
||||
format: byte
|
||||
type: string
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
json:
|
||||
description: dashboard json
|
||||
type: string
|
||||
jsonnet:
|
||||
description: Jsonnet
|
||||
type: string
|
||||
jsonnetLib:
|
||||
description: Jsonnet project build
|
||||
properties:
|
||||
fileName:
|
||||
type: string
|
||||
@@ -190,6 +317,7 @@ spec:
|
||||
- gzipJsonnetProject
|
||||
type: object
|
||||
plugins:
|
||||
description: plugins
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
@@ -202,16 +330,162 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the dashboard is refreshed, defaults to 5m
|
||||
if not set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
url:
|
||||
description: dashboard url
|
||||
type: string
|
||||
urlAuthorization:
|
||||
description: authorization options for dashboard from url
|
||||
properties:
|
||||
basicAuth:
|
||||
properties:
|
||||
password:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
username:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- instanceSelector
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of folderUID or folderRef can be declared at the same
|
||||
time
|
||||
rule: (has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef)
|
||||
&& !(has(self.folderUID))) || !(has(self.folderRef) && (has(self.folderUID)))
|
||||
- message: folder field cannot be set when folderUID or folderRef is already
|
||||
declared
|
||||
rule: (has(self.folder) && !(has(self.folderRef) || has(self.folderUID)))
|
||||
|| !(has(self.folder))
|
||||
status:
|
||||
description: GrafanaDashboardStatus defines the observed state of GrafanaDashboard
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The dashboard instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
contentCache:
|
||||
format: byte
|
||||
type: string
|
||||
@@ -223,6 +497,7 @@ spec:
|
||||
hash:
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the dashboard was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
uid:
|
||||
|
||||
@@ -3,11 +3,13 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.12.0
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanadatasources.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaDatasource
|
||||
listKind: GrafanaDatasourceList
|
||||
plural: grafanadatasources
|
||||
@@ -28,16 +30,31 @@ spec:
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaDatasource is the Schema for the grafanadatasources API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaDatasourceSpec defines the desired state of GrafanaDatasource
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
datasource:
|
||||
properties:
|
||||
@@ -50,6 +67,7 @@ spec:
|
||||
database:
|
||||
type: string
|
||||
editable:
|
||||
description: Deprecated field, it has no effect
|
||||
type: boolean
|
||||
isDefault:
|
||||
type: boolean
|
||||
@@ -59,6 +77,7 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
orgId:
|
||||
description: Deprecated field, it has no effect
|
||||
format: int64
|
||||
type: integer
|
||||
secureJsonData:
|
||||
@@ -72,37 +91,58 @@ spec:
|
||||
type: string
|
||||
user:
|
||||
type: string
|
||||
required:
|
||||
- access
|
||||
- name
|
||||
- type
|
||||
- url
|
||||
type: object
|
||||
instanceSelector:
|
||||
description: selects Grafana instances for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
plugins:
|
||||
description: plugins
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
@@ -115,8 +155,14 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the datasource is refreshed, defaults to 5m
|
||||
if not set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
valuesFrom:
|
||||
description: environments variables from secrets or config maps
|
||||
items:
|
||||
properties:
|
||||
targetPath:
|
||||
@@ -124,24 +170,51 @@ spec:
|
||||
valueFrom:
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key
|
||||
must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
@@ -158,14 +231,18 @@ spec:
|
||||
- instanceSelector
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaDatasourceStatus defines the observed state of GrafanaDatasource
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The datasource instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
hash:
|
||||
type: string
|
||||
lastMessage:
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the datasource was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
uid:
|
||||
|
||||
@@ -3,11 +3,13 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.12.0
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanafolders.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaFolder
|
||||
listKind: GrafanaFolderList
|
||||
plural: grafanafolders
|
||||
@@ -24,57 +26,192 @@ spec:
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaFolder is the Schema for the grafanafolders API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaFolderSpec defines the desired state of GrafanaFolder
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
parentFolderRef:
|
||||
description: Reference to an existing GrafanaFolder CR in the same
|
||||
namespace
|
||||
type: string
|
||||
parentFolderUID:
|
||||
description: UID of the folder in which the current folder should
|
||||
be created
|
||||
type: string
|
||||
permissions:
|
||||
description: raw json with folder permissions
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the folder is synced, defaults to 5m if not
|
||||
set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
required:
|
||||
- instanceSelector
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of parentFolderUID or parentFolderRef can be set
|
||||
rule: (has(self.parentFolderUID) && !(has(self.parentFolderRef))) ||
|
||||
(has(self.parentFolderRef) && !(has(self.parentFolderUID))) || !(has(self.parentFolderRef)
|
||||
&& (has(self.parentFolderUID)))
|
||||
status:
|
||||
description: GrafanaFolderStatus defines the observed state of GrafanaFolder
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The folder instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
hash:
|
||||
description: |-
|
||||
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the folder was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafananotificationpolicies.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaNotificationPolicy
|
||||
listKind: GrafanaNotificationPolicyList
|
||||
plural: grafananotificationpolicies
|
||||
singular: grafananotificationpolicy
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaNotificationPolicy is the Schema for the GrafanaNotificationPolicy
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaNotificationPolicySpec defines the desired state of
|
||||
GrafanaNotificationPolicy
|
||||
properties:
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
route:
|
||||
description: Routes for alerts to match against
|
||||
properties:
|
||||
continue:
|
||||
description: continue
|
||||
type: boolean
|
||||
group_by:
|
||||
description: group by
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
group_interval:
|
||||
description: group interval
|
||||
type: string
|
||||
group_wait:
|
||||
description: group wait
|
||||
type: string
|
||||
match_re:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: match re
|
||||
type: object
|
||||
matchers:
|
||||
description: matchers
|
||||
items:
|
||||
properties:
|
||||
isEqual:
|
||||
description: is equal
|
||||
type: boolean
|
||||
isRegex:
|
||||
description: is regex
|
||||
type: boolean
|
||||
name:
|
||||
description: name
|
||||
type: string
|
||||
value:
|
||||
description: value
|
||||
type: string
|
||||
required:
|
||||
- isRegex
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
mute_time_intervals:
|
||||
description: mute time intervals
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
object_matchers:
|
||||
description: object matchers
|
||||
items:
|
||||
description: |-
|
||||
ObjectMatcher ObjectMatcher is a matcher that can be used to filter alerts.
|
||||
|
||||
|
||||
swagger:model ObjectMatcher
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: array
|
||||
provenance:
|
||||
description: provenance
|
||||
type: string
|
||||
receiver:
|
||||
description: receiver
|
||||
type: string
|
||||
repeat_interval:
|
||||
description: repeat interval
|
||||
type: string
|
||||
routes:
|
||||
description: routes
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
required:
|
||||
- instanceSelector
|
||||
- route
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaNotificationPolicyStatus defines the observed state
|
||||
of GrafanaNotificationPolicy
|
||||
properties:
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- route.openshift.io
|
||||
resources:
|
||||
- routes
|
||||
- routes/custom-host
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
@@ -0,0 +1,250 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- persistentvolumeclaims
|
||||
- secrets
|
||||
- serviceaccounts
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanacontactpoints
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanacontactpoints/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanacontactpoints/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafananotificationpolicies
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafananotificationpolicies/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafananotificationpolicies/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
@@ -23,6 +23,13 @@ If release name contains chart name it will be used as a full name.
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Allow the release namespace to be overridden
|
||||
*/}}
|
||||
{{- define "grafana-operator.namespace" -}}
|
||||
{{ .Values.namespaceOverride | default .Release.Namespace }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
@@ -40,6 +47,10 @@ helm.sh/chart: {{ include "grafana-operator.chart" . }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/part-of: grafana-operator
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
|
||||
@@ -3,11 +3,10 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "grafana-operator.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "grafana-operator.namespace" . }}
|
||||
labels:
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- include "grafana-operator.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: operator
|
||||
data:
|
||||
controller_manager_config.yaml: |
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||
|
||||
@@ -2,12 +2,10 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "grafana-operator.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "grafana-operator.namespace" . }}
|
||||
labels:
|
||||
{{- include "grafana-operator.labels" . | nindent 4 }}
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: operator
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@@ -20,10 +18,8 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "grafana-operator.selectorLabels" . | nindent 8 }}
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- include "grafana-operator.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: operator
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -49,12 +45,19 @@ spec:
|
||||
{{ else }}
|
||||
value: {{ .Values.watchNamespaces }}
|
||||
{{- end }}
|
||||
- name: WATCH_NAMESPACE_SELECTOR
|
||||
{{- if and .Values.namespaceScope (eq .Values.watchNamespaceSelector "") }}
|
||||
value: ""
|
||||
{{ else }}
|
||||
value: {{quote .Values.watchNamespaceSelector }}
|
||||
{{- end }}
|
||||
{{- with .Values.env }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
args:
|
||||
- --health-probe-bind-address=:8081
|
||||
- --metrics-bind-address=0.0.0.0:{{ .Values.metricsService.metricsPort }}
|
||||
- --pprof-addr=0.0.0.0:{{ .Values.metricsService.pprofPort }}
|
||||
{{- if .Values.leaderElect }}
|
||||
- --leader-elect
|
||||
{{- end }}
|
||||
@@ -65,6 +68,9 @@ spec:
|
||||
- containerPort: {{ .Values.metricsService.metricsPort }}
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
- containerPort: {{ .Values.metricsService.pprofPort }}
|
||||
name: pprof
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{{ range .Values.extraObjects }}
|
||||
---
|
||||
{{ tpl (toYaml .) $ }}
|
||||
{{ end }}
|
||||
@@ -1,8 +1,15 @@
|
||||
{{- $watchNamespaces := coalesce .Values.watchNamespaces .Release.Namespace }}
|
||||
{{- if .Values.rbac.create -}}
|
||||
{{ $rbac := .Files.Get "files/rbac.yaml" | fromYaml }}
|
||||
{{ $rbacOpenShift := .Files.Get "files/rbac-openshift.yaml" | fromYaml }}
|
||||
{{- $watchNamespaces := coalesce .Values.watchNamespaces .Values.namespaceOverride .Release.Namespace }}
|
||||
{{- $namespaceScoped := false }}
|
||||
{{- $isOpenShift := false }}
|
||||
{{- if or (.Values.namespaceScope) (.Values.watchNamespaces) }}
|
||||
{{- $namespaceScoped = true }}
|
||||
{{- end }}
|
||||
{{- if (.Values.isOpenShift) }}
|
||||
{{- $isOpenShift = true }}
|
||||
{{- end }}
|
||||
{{- $operatorNamespace := .Release.Namespace }}
|
||||
{{- range ( split "," $watchNamespaces ) }}
|
||||
---
|
||||
@@ -10,243 +17,35 @@ apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: {{ if not $namespaceScoped }}Cluster{{ end }}Role
|
||||
metadata:
|
||||
{{- if $namespaceScoped }}
|
||||
namespace: {{ $operatorNamespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
name: grafana-operator-permissions
|
||||
name: {{ include "grafana-operator.fullname" $ }}
|
||||
labels:
|
||||
{{- include "grafana-operator.labels" $ | nindent 4 }}
|
||||
{{- with $.Values.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: operator
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- persistentvolumeclaims
|
||||
- secrets
|
||||
- serviceaccounts
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- route.openshift.io
|
||||
resources:
|
||||
- routes
|
||||
- routes/custom-host
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
{{- toYaml $rbac.rules | nindent 2 }}
|
||||
{{- if $isOpenShift }}
|
||||
{{- toYaml $rbacOpenShift.rules | nindent 2 -}}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: {{ if not $namespaceScoped }}Cluster{{ end }}RoleBinding
|
||||
metadata:
|
||||
name: grafana-operator-permissions
|
||||
name: {{ include "grafana-operator.fullname" $ }}
|
||||
{{- if $namespaceScoped }}
|
||||
namespace: {{ $operatorNamespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "grafana-operator.labels" $ | nindent 4 }}
|
||||
{{- with $.Values.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: operator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "grafana-operator.serviceAccountName" $ }}
|
||||
namespace: {{ $operatorNamespace }}
|
||||
namespace: {{ include "grafana-operator.namespace" $ }}
|
||||
roleRef:
|
||||
kind: {{ if not $namespaceScoped }}Cluster{{ end }}Role
|
||||
name: grafana-operator-permissions
|
||||
name: {{ include "grafana-operator.fullname" $ }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,12 +2,10 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "grafana-operator.fullname" . }}-metrics-service
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "grafana-operator.namespace" . }}
|
||||
labels:
|
||||
{{- include "grafana-operator.labels" . | nindent 4 }}
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: operator
|
||||
spec:
|
||||
type: {{ .Values.metricsService.type }}
|
||||
ports:
|
||||
@@ -15,5 +13,9 @@ spec:
|
||||
targetPort: metrics
|
||||
protocol: TCP
|
||||
name: metrics
|
||||
- port: {{ .Values.metricsService.pprofPort }}
|
||||
targetPort: pprof
|
||||
protocol: TCP
|
||||
name: pprof
|
||||
selector:
|
||||
{{- include "grafana-operator.selectorLabels" . | nindent 4 }}
|
||||
|
||||
@@ -3,12 +3,10 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "grafana-operator.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "grafana-operator.namespace" . }}
|
||||
labels:
|
||||
{{- include "grafana-operator.labels" . | nindent 4 }}
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: operator
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{{- if.Values.serviceMonitor.enabled -}}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "grafana-operator.fullname" . }}
|
||||
namespace: {{ include "grafana-operator.namespace" . }}
|
||||
labels:
|
||||
{{- include "grafana-operator.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: operator
|
||||
{{- with .Values.serviceMonitor.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Release.Name }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "grafana-operator.selectorLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: {{ .Values.serviceMonitor.telemetryPath }}
|
||||
{{- with .Values.serviceMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ . }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
{{ toYaml .Values.serviceMonitor.metricRelabelings | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{ toYaml .Values.serviceMonitor.relabelings | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceMonitor.targetLabels }}
|
||||
targetLabels:
|
||||
{{- range .Values.serviceMonitor.targetLabels }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -10,6 +10,14 @@ leaderElect: false
|
||||
# By default it's all namespaces, if you only want to listen for the same namespace as the operator is deployed to look at namespaceScope.
|
||||
watchNamespaces: ""
|
||||
|
||||
# -- Sets the WATCH_NAMESPACE_SELECTOR environment variable,
|
||||
# it defines which namespaces the operator should be listening for based on label and key value pair added on namespace kind.
|
||||
# By default it's all namespaces.
|
||||
watchNamespaceSelector: ""
|
||||
|
||||
# -- Determines if the target cluster is OpenShift. Additional rbac permissions for routes will be added on OpenShift
|
||||
isOpenShift: false
|
||||
|
||||
# -- Additional environment variables
|
||||
env: []
|
||||
# -- grafana image, e.g. docker.io/grafana/grafana:9.1.6, overwrites the default grafana image defined in the operator
|
||||
@@ -29,9 +37,15 @@ image:
|
||||
# -- image pull secrets
|
||||
imagePullSecrets: []
|
||||
|
||||
# -- Overrides the name of the chart.
|
||||
nameOverride: ""
|
||||
|
||||
# -- Overrides the fully qualified app name.
|
||||
fullnameOverride: ""
|
||||
|
||||
# -- Overrides the namespace name.
|
||||
namespaceOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# -- Specifies whether a service account should be created
|
||||
create: true
|
||||
@@ -41,11 +55,18 @@ serviceAccount:
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
rbac:
|
||||
# -- Specifies whether to create the ClusterRole and ClusterRoleBinding.
|
||||
# If "namespaceScope" is true or "watchNamespaces" is set, this will create Role and RoleBinding instead.
|
||||
create: true
|
||||
|
||||
metricsService:
|
||||
# -- metrics service type
|
||||
type: ClusterIP
|
||||
# -- metrics service port
|
||||
metricsPort: 9090
|
||||
# -- port for the pprof profiling endpoint
|
||||
pprofPort: 8888
|
||||
|
||||
# -- additional labels to add to all resources
|
||||
additionalLabels: {}
|
||||
@@ -78,3 +99,42 @@ tolerations: []
|
||||
|
||||
# -- pod affinity
|
||||
affinity: {}
|
||||
|
||||
# -- Enable this to use with Prometheus Operator
|
||||
serviceMonitor:
|
||||
# -- When set true then use a ServiceMonitor to configure scraping
|
||||
enabled: false
|
||||
# -- Set of labels to transfer from the Kubernetes Service onto the target
|
||||
additionalLabels: {}
|
||||
# -- Set how frequently Prometheus should scrape
|
||||
interval: 1m
|
||||
# -- Set timeout for scrape
|
||||
scrapeTimeout: 10s
|
||||
# -- Set path to metrics path
|
||||
telemetryPath: /metrics
|
||||
# -- Set of labels to transfer from the Kubernetes Service onto the target
|
||||
targetLabels: []
|
||||
# -- MetricRelabelConfigs to apply to samples before ingestion
|
||||
metricRelabelings: []
|
||||
# -- Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
|
||||
relabelings: []
|
||||
|
||||
# -- Array of extra K8s objects to deploy
|
||||
extraObjects: []
|
||||
# - apiVersion: external-secrets.io/v1beta1
|
||||
# kind: ExternalSecret
|
||||
# metadata:
|
||||
# name: grafana-operator-apikey
|
||||
# spec:
|
||||
# refreshInterval: 1h
|
||||
# secretStoreRef:
|
||||
# kind: SecretStore
|
||||
# name: my-secret-store
|
||||
# target:
|
||||
# template:
|
||||
# data:
|
||||
# GRAFANA_CLOUD_INSTANCE_TOKEN: "{{`{{ .Token }}`}}"
|
||||
# dataFrom:
|
||||
# - extract:
|
||||
# key: my-secret-store-secret
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@ kamaji:
|
||||
deploy: false
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v0.13.0@sha256:197d7c36f76d4d9c09cc82eb87f9e36f05799a2b9158ae27e4729f2dd636ad0d
|
||||
tag: v0.14.0@sha256:47bf03ba0f5a4c25eb53df94a1962bbd2423b1b3d027de26945b06a363eebf2e
|
||||
repository: ghcr.io/aenix-io/cozystack/kamaji
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
appVersion: v0.0.28
|
||||
appVersion: v0.0.30
|
||||
description: Run and operate MariaDB in a cloud native way
|
||||
home: https://github.com/mariadb-operator/mariadb-operator
|
||||
icon: https://mariadb-operator.github.io/mariadb-operator/assets/mariadb_profile.svg
|
||||
@@ -10,10 +10,10 @@ keywords:
|
||||
- mariadb-operator
|
||||
- database
|
||||
- maxscale
|
||||
kubeVersion: '>= 1.16.0-0'
|
||||
kubeVersion: '>=1.26.0-0'
|
||||
maintainers:
|
||||
- email: mariadb-operator@proton.me
|
||||
name: mmontes11
|
||||
name: mariadb-operator
|
||||
type: application
|
||||
version: 0.28.1
|
||||
version: 0.30.0
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<img src="https://mariadb-operator.github.io/mariadb-operator/assets/mariadb-operator_centered_whitebg.svg" alt="mariadb" width="100%"/>
|
||||
</p>
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
Run and operate MariaDB in a cloud native way
|
||||
|
||||
## Installing
|
||||
```bash
|
||||
helm repo add mariadb-operator https://mariadb-operator.github.io/mariadb-operator
|
||||
helm repo add mariadb-operator https://helm.mariadb.com/mariadb-operator
|
||||
helm install mariadb-operator mariadb-operator/mariadb-operator
|
||||
```
|
||||
|
||||
@@ -36,7 +36,7 @@ helm uninstall mariadb-operator
|
||||
| certController.ha.enabled | bool | `false` | Enable high availability |
|
||||
| certController.ha.replicas | int | `3` | Number of replicas |
|
||||
| certController.image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
| certController.image.repository | string | `"ghcr.io/mariadb-operator/mariadb-operator"` | |
|
||||
| certController.image.repository | string | `"docker-registry3.mariadb.com/mariadb-operator/mariadb-operator"` | |
|
||||
| certController.image.tag | string | `""` | Image tag to use. By default the chart appVersion is used |
|
||||
| certController.imagePullSecrets | list | `[]` | |
|
||||
| certController.lookaheadValidity | string | `"2160h"` | Duration used to verify whether a certificate is valid or not. |
|
||||
@@ -59,13 +59,14 @@ helm uninstall mariadb-operator
|
||||
| clusterName | string | `"cluster.local"` | Cluster DNS name |
|
||||
| extrArgs | list | `[]` | Extra arguments to be passed to the controller entrypoint |
|
||||
| extraEnv | list | `[]` | Extra environment variables to be passed to the controller |
|
||||
| extraEnvFrom | list | `[]` | Extra environment variables from preexiting ConfigMap / Secret objects used by the controller using envFrom |
|
||||
| extraVolumeMounts | list | `[]` | Extra volumes to mount to the container. |
|
||||
| extraVolumes | list | `[]` | Extra volumes to pass to pod. |
|
||||
| fullnameOverride | string | `""` | |
|
||||
| ha.enabled | bool | `false` | Enable high availability |
|
||||
| ha.replicas | int | `3` | Number of replicas |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
| image.repository | string | `"ghcr.io/mariadb-operator/mariadb-operator"` | |
|
||||
| image.repository | string | `"docker-registry3.mariadb.com/mariadb-operator/mariadb-operator"` | |
|
||||
| image.tag | string | `""` | Image tag to use. By default the chart appVersion is used |
|
||||
| imagePullSecrets | list | `[]` | |
|
||||
| logLevel | string | `"INFO"` | Controller log level |
|
||||
@@ -78,6 +79,7 @@ helm uninstall mariadb-operator
|
||||
| nodeSelector | object | `{}` | Node selectors to add to controller Pod |
|
||||
| podAnnotations | object | `{}` | Annotations to add to controller Pod |
|
||||
| podSecurityContext | object | `{}` | Security context to add to controller Pod |
|
||||
| rbac.aggregation.enabled | bool | `true` | Specifies whether the cluster roles aggrate to view and edit predefinied roles |
|
||||
| rbac.enabled | bool | `true` | Specifies whether RBAC resources should be created |
|
||||
| resources | object | `{}` | Resources to add to controller container |
|
||||
| securityContext | object | `{}` | Security context to add to controller container |
|
||||
@@ -89,12 +91,14 @@ helm uninstall mariadb-operator
|
||||
| tolerations | list | `[]` | Tolerations to add to controller Pod |
|
||||
| webhook.affinity | object | `{}` | Affinity to add to controller Pod |
|
||||
| webhook.annotations | object | `{}` | Annotations for webhook configurations. |
|
||||
| webhook.cert.caPath | string | `"/tmp/k8s-webhook-server/certificate-authority"` | Path where the CA certificate will be mounted. |
|
||||
| webhook.cert.ca.key | string | `""` | File under 'ca.path' that contains the full CA trust chain. |
|
||||
| webhook.cert.ca.path | string | `""` | Path that contains the full CA trust chain. |
|
||||
| webhook.cert.certManager.duration | string | `""` | Duration to be used in the Certificate resource, |
|
||||
| webhook.cert.certManager.enabled | bool | `false` | Whether to use cert-manager to issue and rotate the certificate. If set to false, mariadb-operator's cert-controller will be used instead. |
|
||||
| webhook.cert.certManager.issuerRef | object | `{}` | Issuer reference to be used in the Certificate resource. If not provided, a self-signed issuer will be used. |
|
||||
| webhook.cert.certManager.renewBefore | string | `""` | Renew before duration to be used in the Certificate resource. |
|
||||
| webhook.cert.path | string | `"/tmp/k8s-webhook-server/serving-certs"` | Path where the certificate will be mounted. |
|
||||
| webhook.cert.certManager.revisionHistoryLimit | int | `3` | The maximum number of CertificateRequest revisions that are maintained in the Certificate’s history. |
|
||||
| webhook.cert.path | string | `"/tmp/k8s-webhook-server/serving-certs"` | Path where the certificate will be mounted. 'tls.crt' and 'tls.key' certificates files should be under this path. |
|
||||
| webhook.cert.secretAnnotations | object | `{}` | Annotatioms to be added to webhook TLS secret. |
|
||||
| webhook.cert.secretLabels | object | `{}` | Labels to be added to webhook TLS secret. |
|
||||
| webhook.extrArgs | list | `[]` | Extra arguments to be passed to the webhook entrypoint |
|
||||
@@ -104,7 +108,7 @@ helm uninstall mariadb-operator
|
||||
| webhook.ha.replicas | int | `3` | Number of replicas |
|
||||
| webhook.hostNetwork | bool | `false` | Expose the webhook server in the host network |
|
||||
| webhook.image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
| webhook.image.repository | string | `"ghcr.io/mariadb-operator/mariadb-operator"` | |
|
||||
| webhook.image.repository | string | `"docker-registry3.mariadb.com/mariadb-operator/mariadb-operator"` | |
|
||||
| webhook.image.tag | string | `""` | Image tag to use. By default the chart appVersion is used |
|
||||
| webhook.imagePullSecrets | list | `[]` | |
|
||||
| webhook.nodeSelector | object | `{}` | Node selectors to add to controller Pod |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ $chartRepo := "https://mariadb-operator.github.io/mariadb-operator" }}
|
||||
{{ $chartRepo := "https://helm.mariadb.com/mariadb-operator" }}
|
||||
{{ $org := "mariadb-operator" }}
|
||||
{{ $release := "mariadb-operator" }}
|
||||
[//]: # (README.md generated by gotmpl. DO NOT EDIT.)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,6 +70,34 @@ app.kubernetes.io/name: {{ include "mariadb-operator.name" . }}-webhook
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Webhook CA path to use cert-controller issued certificates
|
||||
*/}}
|
||||
{{- define "mariadb-operator-webhook.certControllerCAPath" -}}
|
||||
{{ .Values.webhook.cert.ca.path | default "/tmp/k8s-webhook-server/certificate-authority" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Webhook CA full path to use cert-controller issued certificates
|
||||
*/}}
|
||||
{{- define "mariadb-operator-webhook.certControllerFullCAPath" -}}
|
||||
{{- printf "%s/%s" (include "mariadb-operator-webhook.certControllerCAPath" .) (.Values.webhook.cert.ca.key | default "tls.crt") }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Webhook CA path to use cert-manager issued certificates
|
||||
*/}}
|
||||
{{- define "mariadb-operator-webhook.certManagerCAPath" -}}
|
||||
{{ .Values.webhook.cert.ca.path | default .Values.webhook.cert.path }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Webhook CA full path to use cert-manager issued certificates
|
||||
*/}}
|
||||
{{- define "mariadb-operator-webhook.certManagerFullCAPath" -}}
|
||||
{{- printf "%s/%s" (include "mariadb-operator-webhook.certManagerCAPath" .) (.Values.webhook.cert.ca.key | default "ca.crt") }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Cert-controller common labels
|
||||
*/}}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
MARIADB_GALERA_AGENT_IMAGE: ghcr.io/mariadb-operator/mariadb-operator:v0.0.28
|
||||
MARIADB_GALERA_INIT_IMAGE: ghcr.io/mariadb-operator/mariadb-operator:v0.0.28
|
||||
MARIADB_ENTRYPOINT_VERSION: "11.4"
|
||||
MARIADB_GALERA_LIB_PATH: /usr/lib/galera/libgalera_smm.so
|
||||
MARIADB_OPERATOR_IMAGE: ghcr.io/mariadb-operator/mariadb-operator:v0.0.28
|
||||
MARIADB_OPERATOR_IMAGE: docker-registry3.mariadb.com/mariadb-operator/mariadb-operator:v0.0.30
|
||||
RELATED_IMAGE_EXPORTER: prom/mysqld-exporter:v0.15.1
|
||||
RELATED_IMAGE_EXPORTER_MAXSCALE: mariadb/maxscale-prometheus-exporter-ubi:latest
|
||||
RELATED_IMAGE_MARIADB: mariadb:10.11.7
|
||||
RELATED_IMAGE_MAXSCALE: mariadb/maxscale:23.08
|
||||
RELATED_IMAGE_EXPORTER_MAXSCALE: docker-registry2.mariadb.com/mariadb/maxscale-prometheus-exporter-ubi:v0.0.1
|
||||
RELATED_IMAGE_MARIADB: docker-registry1.mariadb.com/library/mariadb:11.4.3
|
||||
RELATED_IMAGE_MAXSCALE: docker-registry2.mariadb.com/mariadb/maxscale:23.08.5
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
|
||||
@@ -63,6 +63,9 @@ spec:
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: mariadb-operator-env
|
||||
{{- with .Values.extraEnvFrom }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: CLUSTER_NAME
|
||||
value: {{ .Values.clusterName }}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{{- if .Values.rbac.enabled -}}
|
||||
{{ $fullName := include "mariadb-operator.fullname" . }}
|
||||
# the mariadb-view ClusterRole allows viewing all k8s.mariadb.com resources
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ $fullName }}-view
|
||||
{{- if .Values.rbac.aggregation.enabled }}
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups: ["k8s.mariadb.com"]
|
||||
resources: ["*"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
# the mariadb-edit ClusterRole allows editing k8s.mariadb.com resources
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ $fullName }}-edit
|
||||
{{- if .Values.rbac.aggregation.enabled }}
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups: ["k8s.mariadb.com"]
|
||||
resources: ["*"]
|
||||
verbs: ["create", "update", "patch", "delete"]
|
||||
{{- end }}
|
||||
@@ -57,15 +57,6 @@ rules:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints/restricted
|
||||
verbs:
|
||||
- create
|
||||
@@ -77,6 +68,9 @@ rules:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
- secrets
|
||||
- serviceaccounts
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- list
|
||||
@@ -104,30 +98,9 @@ rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
- pods/log
|
||||
verbs:
|
||||
- create
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- create
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- get
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
@@ -183,6 +156,14 @@ rules:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- backups
|
||||
- connections
|
||||
- databases
|
||||
- grants
|
||||
- mariadbs
|
||||
- maxscales
|
||||
- restores
|
||||
- sqljobs
|
||||
- users
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
@@ -195,248 +176,41 @@ rules:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- backups/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- backups/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- connections
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- connections
|
||||
- grants
|
||||
- maxscale
|
||||
- restores
|
||||
- users
|
||||
verbs:
|
||||
- create
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- connections
|
||||
- grants
|
||||
- users
|
||||
verbs:
|
||||
- create
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- connections/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- connections/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- databases
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- databases/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- databases/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- grants
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- grants/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- grants/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- mariadbs
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- mariadbs/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- mariadbs/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- maxscales
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- maxscales/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- maxscales/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- restores
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- restores/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- restores/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- sqljobs
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- sqljobs/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- sqljobs/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- users
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- users/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- backups/status
|
||||
- connections/status
|
||||
- databases/status
|
||||
- grants/status
|
||||
- mariadbs/status
|
||||
- maxscales/status
|
||||
- restores/status
|
||||
- sqljobs/status
|
||||
- users/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
- maxscale
|
||||
verbs:
|
||||
- create
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- monitoring.coreos.com
|
||||
resources:
|
||||
|
||||
@@ -36,7 +36,11 @@ spec:
|
||||
{{- with .Values.webhook.cert.certManager.renewBefore }}
|
||||
renewBefore: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.webhook.cert.certManager.revisionHistoryLimit }}
|
||||
revisionHistoryLimit: {{ . }}
|
||||
{{- end }}
|
||||
secretName: {{ include "mariadb-operator.fullname" . }}-webhook-cert
|
||||
{{- if or (.Values.webhook.cert.secretLabels) (.Values.webhook.cert.secretAnnotations) }}
|
||||
secretTemplate:
|
||||
{{- with .Values.webhook.cert.secretLabels }}
|
||||
labels:
|
||||
@@ -44,6 +48,7 @@ spec:
|
||||
{{- end }}
|
||||
{{- with .Values.webhook.cert.secretAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -51,9 +51,9 @@ spec:
|
||||
args:
|
||||
- webhook
|
||||
{{- if .Values.webhook.cert.certManager.enabled }}
|
||||
- --ca-cert-path={{ .Values.webhook.cert.path }}/ca.crt
|
||||
- --ca-cert-path={{ include "mariadb-operator-webhook.certManagerFullCAPath" . }}
|
||||
{{- else }}
|
||||
- --ca-cert-path={{ .Values.webhook.cert.caPath }}/tls.crt
|
||||
- --ca-cert-path={{ include "mariadb-operator-webhook.certControllerFullCAPath" . }}
|
||||
{{- end }}
|
||||
- --cert-dir={{ .Values.webhook.cert.path }}
|
||||
- --dns-name={{ $fullName }}-webhook.{{ .Release.Namespace }}.svc
|
||||
@@ -76,7 +76,7 @@ spec:
|
||||
name: health
|
||||
volumeMounts:
|
||||
{{- if not .Values.webhook.cert.certManager.enabled }}
|
||||
- mountPath: {{ .Values.webhook.cert.caPath }}
|
||||
- mountPath: {{ include "mariadb-operator-webhook.certControllerCAPath" . }}
|
||||
name: ca
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
|
||||
@@ -2,7 +2,7 @@ nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
image:
|
||||
repository: ghcr.io/mariadb-operator/mariadb-operator
|
||||
repository: docker-registry3.mariadb.com/mariadb-operator/mariadb-operator
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Image tag to use. By default the chart appVersion is used
|
||||
tag: ""
|
||||
@@ -51,12 +51,20 @@ rbac:
|
||||
# -- Specifies whether RBAC resources should be created
|
||||
enabled: true
|
||||
|
||||
aggregation:
|
||||
|
||||
# -- Specifies whether the cluster roles aggrate to view and edit predefinied roles
|
||||
enabled: true
|
||||
|
||||
# -- Extra arguments to be passed to the controller entrypoint
|
||||
extrArgs: []
|
||||
|
||||
# -- Extra environment variables to be passed to the controller
|
||||
extraEnv: []
|
||||
|
||||
# -- Extra environment variables from preexiting ConfigMap / Secret objects used by the controller using envFrom
|
||||
extraEnvFrom: []
|
||||
|
||||
# -- Extra volumes to pass to pod.
|
||||
extraVolumes: []
|
||||
|
||||
@@ -89,7 +97,7 @@ affinity: {}
|
||||
|
||||
webhook:
|
||||
image:
|
||||
repository: ghcr.io/mariadb-operator/mariadb-operator
|
||||
repository: docker-registry3.mariadb.com/mariadb-operator/mariadb-operator
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Image tag to use. By default the chart appVersion is used
|
||||
tag: ""
|
||||
@@ -105,17 +113,22 @@ webhook:
|
||||
enabled: false
|
||||
# -- Issuer reference to be used in the Certificate resource. If not provided, a self-signed issuer will be used.
|
||||
issuerRef: {}
|
||||
# -- Duration to be used in the Certificate resource,
|
||||
# -- Duration to be used in the Certificate resource,
|
||||
duration: ""
|
||||
# -- Renew before duration to be used in the Certificate resource.
|
||||
# -- Renew before duration to be used in the Certificate resource.
|
||||
renewBefore: ""
|
||||
# -- The maximum number of CertificateRequest revisions that are maintained in the Certificate’s history.
|
||||
revisionHistoryLimit: 3
|
||||
# -- Annotatioms to be added to webhook TLS secret.
|
||||
secretAnnotations: {}
|
||||
# -- Labels to be added to webhook TLS secret.
|
||||
secretLabels: {}
|
||||
# -- Path where the CA certificate will be mounted.
|
||||
caPath: /tmp/k8s-webhook-server/certificate-authority
|
||||
# -- Path where the certificate will be mounted.
|
||||
ca:
|
||||
# -- Path that contains the full CA trust chain.
|
||||
path: ""
|
||||
# -- File under 'ca.path' that contains the full CA trust chain.
|
||||
key: ""
|
||||
# -- Path where the certificate will be mounted. 'tls.crt' and 'tls.key' certificates files should be under this path.
|
||||
path: /tmp/k8s-webhook-server/serving-certs
|
||||
# -- Port to be used by the webhook server
|
||||
port: 9443
|
||||
@@ -173,7 +186,7 @@ certController:
|
||||
# -- Specifies whether the cert-controller should be created.
|
||||
enabled: true
|
||||
image:
|
||||
repository: ghcr.io/mariadb-operator/mariadb-operator
|
||||
repository: docker-registry3.mariadb.com/mariadb-operator/mariadb-operator
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Image tag to use. By default the chart appVersion is used
|
||||
tag: ""
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
mariadb-operator:
|
||||
clusterName: cozy.local
|
||||
metrics:
|
||||
enabled: true
|
||||
webhook:
|
||||
|
||||
@@ -8,3 +8,4 @@ update:
|
||||
helm repo add cnpg https://cloudnative-pg.github.io/charts
|
||||
helm repo update cnpg
|
||||
helm pull cnpg/cloudnative-pg --untar --untardir charts
|
||||
rm -rf charts/cloudnative-pg/charts
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: cluster
|
||||
repository: https://cloudnative-pg.github.io/grafana-dashboards
|
||||
version: 0.0.2
|
||||
digest: sha256:fcf16ad357c17be3dd79c138723e78e9e101fecc5d07d9371299c32b9f85dbd9
|
||||
generated: "2024-04-25T12:32:36.61779032-04:00"
|
||||
@@ -1,5 +1,11 @@
|
||||
apiVersion: v2
|
||||
appVersion: 1.22.2
|
||||
appVersion: 1.24.0
|
||||
dependencies:
|
||||
- alias: monitoring
|
||||
condition: monitoring.grafanaDashboard.create
|
||||
name: cluster
|
||||
repository: https://cloudnative-pg.github.io/grafana-dashboards
|
||||
version: "0.0"
|
||||
description: CloudNativePG Operator Helm Chart
|
||||
home: https://cloudnative-pg.io
|
||||
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
|
||||
@@ -16,4 +22,4 @@ name: cloudnative-pg
|
||||
sources:
|
||||
- https://github.com/cloudnative-pg/charts
|
||||
type: application
|
||||
version: 0.20.2
|
||||
version: 0.22.0
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -46,6 +46,12 @@ spec:
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.hostNetwork }}
|
||||
hostNetwork: {{ .Values.hostNetwork }}
|
||||
{{- end }}
|
||||
{{- if .Values.dnsPolicy }}
|
||||
dnsPolicy: {{ .Values.dnsPolicy }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- args:
|
||||
- controller
|
||||
@@ -72,6 +78,9 @@ spec:
|
||||
fieldPath: metadata.namespace
|
||||
- name: MONITORING_QUERIES_CONFIGMAP
|
||||
value: "{{ .Values.monitoringQueriesConfigMap.name }}"
|
||||
{{- if .Values.additionalEnv }}
|
||||
{{- tpl (.Values.additionalEnv | toYaml) . | nindent 8 }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
livenessProbe:
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{{- if .Values.monitoring.grafanaDashboard.create -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Values.monitoring.grafanaDashboard.configMapName }}
|
||||
namespace: {{ default .Release.Namespace .Values.monitoring.grafanaDashboard.namespace }}
|
||||
labels:
|
||||
{{ .Values.monitoring.grafanaDashboard.sidecarLabel }}: {{ .Values.monitoring.grafanaDashboard.sidecarLabelValue | quote }}
|
||||
data:
|
||||
cnp.json: |-
|
||||
{{ .Files.Get "monitoring/grafana-dashboard.json" | indent 6 }}
|
||||
{{- end -}}
|
||||
@@ -5,6 +5,9 @@ metadata:
|
||||
name: {{ include "cloudnative-pg.fullname" . }}
|
||||
labels:
|
||||
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||
{{- with .Values.monitoring.podMonitorAdditionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end}}
|
||||
{{- with .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
@@ -15,4 +18,12 @@ spec:
|
||||
{{- include "cloudnative-pg.selectorLabels" . | nindent 6 }}
|
||||
podMetricsEndpoints:
|
||||
- port: metrics
|
||||
{{- end }}
|
||||
{{- with .Values.monitoring.podMonitorMetricRelabelings }}
|
||||
metricRelabelings:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.monitoring.podMonitorRelabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -67,14 +67,6 @@ rules:
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
@@ -171,26 +163,14 @@ rules:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
@@ -265,6 +245,14 @@ rules:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- postgresql.cnpg.io
|
||||
resources:
|
||||
- clusterimagecatalogs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- postgresql.cnpg.io
|
||||
resources:
|
||||
@@ -292,6 +280,14 @@ rules:
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- postgresql.cnpg.io
|
||||
resources:
|
||||
- imagecatalogs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- postgresql.cnpg.io
|
||||
resources:
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
"additionalArgs": {
|
||||
"type": "array"
|
||||
},
|
||||
"additionalEnv": {
|
||||
"type": "array"
|
||||
},
|
||||
"affinity": {
|
||||
"type": "object"
|
||||
},
|
||||
@@ -72,9 +75,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dnsPolicy": {
|
||||
"type": "string"
|
||||
},
|
||||
"fullnameOverride": {
|
||||
"type": "string"
|
||||
},
|
||||
"hostNetwork": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"image": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -98,12 +107,18 @@
|
||||
"grafanaDashboard": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"type": "object"
|
||||
},
|
||||
"configMapName": {
|
||||
"type": "string"
|
||||
},
|
||||
"create": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -115,8 +130,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"podMonitorAdditionalLabels": {
|
||||
"type": "object"
|
||||
},
|
||||
"podMonitorEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"podMonitorMetricRelabelings": {
|
||||
"type": "array"
|
||||
},
|
||||
"podMonitorRelabelings": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -29,6 +29,9 @@ imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
hostNetwork: false
|
||||
dnsPolicy: ""
|
||||
|
||||
crds:
|
||||
# -- Specifies whether the CRDs should be created when installing the chart.
|
||||
create: true
|
||||
@@ -66,6 +69,14 @@ config:
|
||||
# -- Additinal arguments to be added to the operator's args list.
|
||||
additionalArgs: []
|
||||
|
||||
# -- Array containing extra environment variables which can be templated.
|
||||
# For example:
|
||||
# - name: RELEASE_NAME
|
||||
# value: "{{ .Release.Name }}"
|
||||
# - name: MY_VAR
|
||||
# value: "mySpecialKey"
|
||||
additionalEnv: []
|
||||
|
||||
serviceAccount:
|
||||
# -- Specifies whether the service account should be created.
|
||||
create: true
|
||||
@@ -137,18 +148,30 @@ tolerations: []
|
||||
affinity: {}
|
||||
|
||||
monitoring:
|
||||
|
||||
# -- Specifies whether the monitoring should be enabled. Requires Prometheus Operator CRDs.
|
||||
podMonitorEnabled: false
|
||||
# -- Metrics relabel configurations to apply to samples before ingestion.
|
||||
podMonitorMetricRelabelings: []
|
||||
# -- Relabel configurations to apply to samples before scraping.
|
||||
podMonitorRelabelings: []
|
||||
# -- Additional labels for the podMonitor
|
||||
podMonitorAdditionalLabels: {}
|
||||
|
||||
grafanaDashboard:
|
||||
create: false
|
||||
# -- Allows overriding the namespace where the ConfigMap will be created, defaulting to the same one as the Release.
|
||||
namespace: ""
|
||||
# -- The name of the ConfigMap containing the dashboard.
|
||||
configMapName: "cnpg-grafana-dashboard"
|
||||
# -- Label that ConfigMaps should have to be loaded as dashboards.
|
||||
# -- Label that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.
|
||||
sidecarLabel: "grafana_dashboard"
|
||||
# -- Label value that ConfigMaps should have to be loaded as dashboards.
|
||||
# -- Label value that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.
|
||||
sidecarLabelValue: "1"
|
||||
# -- Labels that ConfigMaps should have to get configured in Grafana.
|
||||
labels: {}
|
||||
# -- Annotations that ConfigMaps can have to get configured in Grafana.
|
||||
annotations: {}
|
||||
|
||||
# Default monitoring queries
|
||||
monitoringQueriesConfigMap:
|
||||
@@ -232,6 +255,7 @@ monitoringQueriesConfigMap:
|
||||
, pg_catalog.age(datfrozenxid) AS xid_age
|
||||
, pg_catalog.mxid_age(datminmxid) AS mxid_age
|
||||
FROM pg_catalog.pg_database
|
||||
WHERE datallowconn
|
||||
metrics:
|
||||
- datname:
|
||||
usage: "LABEL"
|
||||
@@ -351,6 +375,7 @@ monitoringQueriesConfigMap:
|
||||
description: "Time at which these statistics were last reset"
|
||||
|
||||
pg_stat_bgwriter:
|
||||
runonserver: "<17.0.0"
|
||||
query: |
|
||||
SELECT checkpoints_timed
|
||||
, checkpoints_req
|
||||
@@ -395,6 +420,71 @@ monitoringQueriesConfigMap:
|
||||
usage: "COUNTER"
|
||||
description: "Number of buffers allocated"
|
||||
|
||||
pg_stat_bgwriter_17:
|
||||
runonserver: ">=17.0.0"
|
||||
name: pg_stat_bgwriter
|
||||
query: |
|
||||
SELECT buffers_clean
|
||||
, maxwritten_clean
|
||||
, buffers_alloc
|
||||
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
|
||||
FROM pg_catalog.pg_stat_bgwriter
|
||||
metrics:
|
||||
- buffers_clean:
|
||||
usage: "COUNTER"
|
||||
description: "Number of buffers written by the background writer"
|
||||
- maxwritten_clean:
|
||||
usage: "COUNTER"
|
||||
description: "Number of times the background writer stopped a cleaning scan because it had written too many buffers"
|
||||
- buffers_alloc:
|
||||
usage: "COUNTER"
|
||||
description: "Number of buffers allocated"
|
||||
- stats_reset_time:
|
||||
usage: "GAUGE"
|
||||
description: "Time at which these statistics were last reset"
|
||||
|
||||
pg_stat_checkpointer:
|
||||
runonserver: ">=17.0.0"
|
||||
query: |
|
||||
SELECT num_timed AS checkpoints_timed
|
||||
, num_requested AS checkpoints_req
|
||||
, restartpoints_timed
|
||||
, restartpoints_req
|
||||
, restartpoints_done
|
||||
, write_time
|
||||
, sync_time
|
||||
, buffers_written
|
||||
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
|
||||
FROM pg_catalog.pg_stat_checkpointer
|
||||
metrics:
|
||||
- checkpoints_timed:
|
||||
usage: "COUNTER"
|
||||
description: "Number of scheduled checkpoints that have been performed"
|
||||
- checkpoints_req:
|
||||
usage: "COUNTER"
|
||||
description: "Number of requested checkpoints that have been performed"
|
||||
- restartpoints_timed:
|
||||
usage: "COUNTER"
|
||||
description: "Number of scheduled restartpoints due to timeout or after a failed attempt to perform it"
|
||||
- restartpoints_req:
|
||||
usage: "COUNTER"
|
||||
description: "Number of requested restartpoints that have been performed"
|
||||
- restartpoints_done:
|
||||
usage: "COUNTER"
|
||||
description: "Number of restartpoints that have been performed"
|
||||
- write_time:
|
||||
usage: "COUNTER"
|
||||
description: "Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are written to disk, in milliseconds"
|
||||
- sync_time:
|
||||
usage: "COUNTER"
|
||||
description: "Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are synchronized to disk, in milliseconds"
|
||||
- buffers_written:
|
||||
usage: "COUNTER"
|
||||
description: "Number of buffers written during checkpoints and restartpoints"
|
||||
- stats_reset_time:
|
||||
usage: "GAUGE"
|
||||
description: "Time at which these statistics were last reset"
|
||||
|
||||
pg_stat_database:
|
||||
query: |
|
||||
SELECT datname
|
||||
|
||||
@@ -8,3 +8,6 @@ update:
|
||||
wget -O templates/cluster-operator.yml https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml
|
||||
yq -i 'del(select(.kind=="Namespace"))' templates/cluster-operator.yml
|
||||
sed -i 's/rabbitmq-system/$(NAMESPACE)/g' templates/cluster-operator.yml
|
||||
wget -O templates/messaging-topology-operator.yml https://github.com/rabbitmq/messaging-topology-operator/releases/latest/download/messaging-topology-operator-with-certmanager.yaml
|
||||
yq -i 'del(select(.kind=="Namespace"))' templates/messaging-topology-operator.yml
|
||||
sed -i 's/rabbitmq-system/$(NAMESPACE)/g' templates/messaging-topology-operator.yml
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user