Compare commits

..

25 Commits

Author SHA1 Message Date
Andrei Kvapil
4cac2191ea Grafana OnCall
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-06 12:58:32 +02:00
Andrei Kvapil
b40e1b09cb Prepare release v0.14.0 (#333)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Upgraded various container images to version `v0.14.0`, enhancing
application performance and potentially introducing new features and bug
fixes.
  
- **Bug Fixes**
- Improved version tracking for packages by updating commit hashes,
enhancing clarity and traceability.

- **Chores**
- Updated configuration files to reflect the new image versions for
components, ensuring the latest updates are utilized across the
application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 16:23:21 +02:00
Andrei Kvapil
93018c4035 Add passwords generation to ClickHouse (#332)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated Clickhouse application to version 0.4.0, indicating new
enhancements.
- Improved user credential management by dynamically generating
passwords or using provided ones, enhancing security.
- Introduced a new Kubernetes Role for managing access to services and
secrets, ensuring better control over resource interactions.

- **Bug Fixes**
- Corrected the reference for accessing the storage class value to
ensure proper retrieval.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:20:38 +02:00
Andrei Kvapil
b00621ee2a Add passwords generation to postgres (#330)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:15:24 +02:00
Andrei Kvapil
02a623b17d Update CNPG 1.24.0 (#331) 2024-09-04 15:15:05 +02:00
Andrei Kvapil
def2eb0f42 Add passwords generation to FerretDB (#329)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated application version from 0.3.0 to 0.4.0, indicating a new
release.
- Introduced a new Kubernetes Role for managing access to
dashboard-related resources, enhancing security.
- Improved user credential management with dynamic password generation
in the initialization script, enhancing security practices.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:14:50 +02:00
Andrei Kvapil
aa2f553281 Update mariadb-operator and mysql chart (#328)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced database user management with role definitions for `admin`
and `readonly` users.
- Introduced support for additional environment variables in the MariaDB
operator deployment.
	- Added new RBAC roles for viewing and editing MariaDB resources.

- **Changes**
- Updated configuration structure for database and user management,
shifting from arrays to objects.
- Improved webhook certificate management with revision history control.
	- Updated image repository for the MariaDB operator.

- **Bug Fixes**
- Adjusted permissions in RBAC configuration for better security and
resource management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:14:31 +02:00
Andrei Kvapil
36d88553ce Update RabbitMQ and add configuration for Users and VHosts (#327)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Updated RabbitMQ chart version to 0.4.0 and application version to
3.13.2.
- Added new configuration options for users and virtual hosts in the
application.
- Introduced a new Kubernetes Role for managing access to secrets and
services.
- Enhanced RabbitMQ configuration for automated user and permission
management.

- **Documentation**
- Improved README with a section on configuration parameters for better
user guidance.

- **Chores**
- Added a new YAML configuration file for comprehensive RabbitMQ cluster
management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 10:50:54 +02:00
Mr Khachaturov
9e33dc0651 Update seaweedfs.yaml (#325)
Changed tls host to be the same as ingress host

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated the default host value in the SeaweedFS configuration to
support S3-compatible endpoints.
- **Bug Fixes**
- Corrected the hostname configuration to reflect the new service access
method.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-02 09:04:07 +02:00
Andrei Kvapil
b8e33d194d Prepare release v0.13.0 (#321)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced monitoring capabilities for Kubernetes deployments, including
checks for `vmalert`, `vlogs`, and `vmcluster`.

- **Updates**
- Updated container images for `cozystack` and `darkhttpd` to version
`v0.13.0`.
- Version mapping updates for `ferretdb`, `kubernetes`, and
`virtual-machine` packages.
- Updated image tags and digests for Kubeapps components to version
`v0.13.0`.
	- Updated image tag for Kamaji to version `v0.13.0`.
	- Added new pod metadata labels to the `vmalertmanager` configuration.

- **Bug Fixes**
- Improved operational status checks for Kubernetes resources using
JSONPath expressions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-31 09:04:40 +02:00
Andrei Kvapil
c79399abb7 cilium node port (#323)
- Prepare release v0.13.0
- Cilium: enable nodePort

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 18:01:00 +02:00
Andrei Kvapil
005821476c Introduce valuesFiles for various Cilium configurations (#322)
This PR introduces different values files for `cozy-cilium` chart, and
`valuesFiles` for fluxcd.

This might be useful in cases where same chart reused for multiple
configurations

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced multiple values files for enhanced configuration management
in Cilium deployments.
- Added new YAML configurations for Cilium, allowing for tailored
networking settings in Kubernetes.

- **Bug Fixes**
- Removed deprecated configuration parameters to simplify deployment and
management of Cilium.

- **Documentation**
- Updated Helm templates to support conditional inclusion of values
files, improving flexibility in chart rendering.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 17:27:06 +02:00
Andrei Kvapil
53fae0d3f4 cilium: enable SCTP feature (#320)
This PR enables SCTP support in Cilium.

It is required to use with kube-ovn configuration as it is fixes
`externalTrafficPolicy: Local` issues:

- https://github.com/kubeovn/kube-ovn/issues/4457
2024-08-30 13:52:58 +02:00
Andrei Kvapil
4746d51785 VM: add Talos Linux (#319) 2024-08-30 13:30:39 +02:00
Andrei Kvapil
b7bfc4c4a9 VM: fix Alpine Image (#318)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 13:28:59 +02:00
Andrei Kvapil
0e7dc14d79 KubeVirt: enable expand disks feature (#317)
- cdi: add ExpandDisks feature
- kubevirt: add ExpandDisks feature
2024-08-30 13:16:15 +02:00
Andrei Kvapil
55282acdba vm: use block volumes to enable live-migration (#316)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 13:14:46 +02:00
Andrei Kvapil
5efef2eec5 use bridge binding for Kubernetes VMs (#315)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Updated version of the Kubernetes application to 0.10.0.
- Enhanced network configuration for improved pod performance, including
support for live migration.
- Introduced a new network section for better integration with
Kubernetes networking features.

- **Bug Fixes**
- Improved network interface management for better flexibility and
control.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 13:14:33 +02:00
Andrei Kvapil
9b6dd19dc8 Update KubeVirt v1.3.1 (#314) 2024-08-30 12:09:40 +02:00
Andrei Kvapil
dc69adc9e2 Revert "Update KubeVirt v1.3.1" (#313)
Reverts aenix-io/cozystack#311
2024-08-30 12:07:40 +02:00
Andrei Kvapil
9ae098c5e3 Update CDI v1.60.2 (#312) 2024-08-30 12:02:52 +02:00
Andrei Kvapil
697bbd59eb Update KubeVirt v1.3.1 (#311)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated version identifiers for the `ferretdb`, `virtual-machine`,
`monitoring`, and `seaweedfs` packages to enhance clarity and
traceability.
	- Added new version entry for `monitoring` version `1.4.0`.

- **Improvements**
- Upgraded the `cozystack` component to a newer image version
(`v0.13.0`), potentially including bug fixes and performance
enhancements.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-30 12:02:41 +02:00
Artem Rootman
428284354c Rework VirtualMachine, introduce cloudinit and sshKeys configuration, fix externalPorts (#303)
Add `externalPorts`, `sshKeys` and `cloudInit` options with examples.
Remove `service`, `sshPwauth`, `disableRoot`, `password`, `chpasswdExpire` options

---------

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Co-authored-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 11:51:04 +02:00
Andrei Kvapil
b908400d59 fix: typo in storageClass (#310) 2024-08-30 09:42:01 +02:00
Andrei Kvapil
cd991bd2dc fix e2e tests (specify namespace) (#309)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-29 17:36:19 +02:00
122 changed files with 24267 additions and 13988 deletions

View File

@@ -309,8 +309,9 @@ kubectl wait --timeout=5m --for=condition=available -n tenant-root deploy root-i
kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=3 -n tenant-root sts etcd
# Wait for Victoria metrics
kubectl wait --timeout=5m --for=condition=available deploy -n tenant-root vmalert-vmalert-longterm vmalert-vmalert-shortterm vminsert-longterm vminsert-shortterm
kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=2 -n tenant-root sts vmalertmanager-alertmanager vmselect-longterm vmselect-shortterm vmstorage-longterm vmstorage-shortterm
kubectl wait --timeout=5m --for=jsonpath=.status.updateStatus=operational -n tenant-root vmalert/vmalert-longterm vmalert/vmalert-shortterm vmalertmanager/alertmanager
kubectl wait --timeout=5m --for=jsonpath=.status.status=operational -n tenant-root vlogs/generic
kubectl wait --timeout=5m --for=jsonpath=.status.clusterStatus=operational -n tenant-root vmcluster/shortterm vmcluster/longterm
# Wait for grafana
kubectl wait --timeout=5m --for=condition=ready -n tenant-root clusters.postgresql.cnpg.io grafana-db

View File

@@ -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

View File

@@ -68,7 +68,7 @@ spec:
serviceAccountName: cozystack
containers:
- name: cozystack
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.12.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.12.0"
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.14.0"
command:
- /usr/bin/darkhttpd
- /cozystack/assets

View File

@@ -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

View File

@@ -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.stroageClass }}
{{- with $.Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
resources:

View File

@@ -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"]

View File

@@ -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

View 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"]

View File

@@ -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

View File

@@ -15,7 +15,7 @@ spec:
storage:
size: {{ required ".Values.size is required" .Values.size }}
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClass: {{ . }}
{{- end }}

View File

@@ -1,56 +0,0 @@
## @section Common parameters
## @param external Enable external access from outside the cluster
## @param size Persistent Volume size
## @param replicas Number of Postgres replicas
##
external: false
size: 10Gi
replicas: 1
## Configuration for the quorum-based synchronous replication
## @param quorum.minSyncReplicas Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed.
## @param quorum.maxSyncReplicas Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances).
quorum:
minSyncReplicas: 0
maxSyncReplicas: 0
## @section Configuration parameters
## @param users [object] Users configuration
## Example:
## users:
## user1:
## password: strongpassword
## user2:
## password: hackme
##
users:
foo:
password: asd
bar:
password: asd
baz:
password: asd
boo:
password: asd
## @section Backup parameters
## @param backup.enabled Enable pereiodic backups
## @param backup.s3Region The AWS S3 region where backups are stored
## @param backup.s3Bucket The S3 bucket used for storing backups
## @param backup.schedule Cron schedule for automated backups
## @param backup.cleanupStrategy The strategy for cleaning up old backups
## @param backup.s3AccessKey The access key for S3, used for authentication
## @param backup.s3SecretKey The secret key for S3, used for authentication
## @param backup.resticPassword The password for Restic backup encryption
backup:
enabled: false
s3Region: us-east-1
s3Bucket: s3.example.org/postgres-backups
schedule: "0 2 * * *"
cleanupStrategy: "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
s3AccessKey: oobaiRus9pah8PhohL1ThaeTa4UVa7gu
s3SecretKey: ju3eum4dekeich9ahM1te8waeGai0oog
resticPassword: ChaXoveekoh6eigh4siesheeda2quai0

View File

@@ -114,7 +114,7 @@ spec:
resources:
requests:
storage: "{{ $.Values.size }}"
{{- with $.Values.stroageClass }}
{{- with $.Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
---

View File

@@ -53,7 +53,7 @@ spec:
{{- with .Values.kafka.size }}
size: {{ . }}
{{- end }}
{{- with .Values.kafka.stroageClass }}
{{- with .Values.kafka.storageClass }}
class: {{ . }}
{{- end }}
deleteClaim: true
@@ -64,7 +64,7 @@ spec:
{{- with .Values.zookeeper.size }}
size: {{ . }}
{{- end }}
{{- with .Values.kafka.stroageClass }}
{{- with .Values.kafka.storageClass }}
class: {{ . }}
{{- end }}
deleteClaim: false

View File

@@ -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.9.0
version: 0.10.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

View File

@@ -18,6 +18,8 @@ spec:
runStrategy: Always
template:
metadata:
annotations:
kubevirt.io/allow-pod-bridge-network-live-migration: "true"
labels:
{{- range .group.roles }}
node-role.kubernetes.io/{{ . }}: ""
@@ -38,7 +40,9 @@ spec:
disk:
bus: virtio
pciAddress: 0000:08:00.0
networkInterfaceMultiqueue: true
interfaces:
- name: default
bridge: {}
memory:
guest: {{ .group.resources.memory }}
evictionStrategy: External
@@ -49,6 +53,9 @@ spec:
- name: ephemeral
emptyDisk:
capacity: {{ .group.ephemeralStorage | default "20Gi" }}
networks:
- name: default
pod: {}
{{- end }}
---
apiVersion: cluster.x-k8s.io/v1beta1

View File

@@ -31,20 +31,8 @@ spec:
values:
cilium:
tunnel: disabled
autoDirectNodeRoutes: false
bpf:
masquerade: true
cgroup:
autoMount:
enabled: true
hostRoot: /run/cilium/cgroupv2
k8sServiceHost: {{ .Release.Name }}.{{ .Release.Namespace }}.svc
k8sServicePort: 6443
cni:
chainingMode: ~
customConf: false
configMap: ""
routingMode: tunnel
enableIPv4Masquerade: true
ipv4NativeRoutingCIDR: ""

View File

@@ -28,7 +28,7 @@ spec:
upgrade:
remediation:
retries: -1
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
values:
storageClass: "{{ . }}"
{{- end }}

View File

@@ -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

View File

@@ -79,7 +79,7 @@ more details:
| Name | Description | Value |
| ----------- | ----------------------- | ----- |
| `users` | Users configuration | `{}` |
| `databases` | Databases configuration | `[]` |
| `databases` | Databases configuration | `{}` |
### Backup parameters

View 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"]

View File

@@ -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 }}

View File

@@ -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"
@@ -62,7 +60,7 @@ spec:
size: {{ .Values.size }}
resizeInUseVolumes: true
waitForVolumeResize: true
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClassName: {{ . }}
{{- end }}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -22,12 +22,6 @@
"description": "StorageClass used to store the data",
"default": ""
},
"databases": {
"type": "array",
"description": "Databases configuration",
"default": [],
"items": {}
},
"backup": {
"type": "object",
"properties": {

View File

@@ -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

View File

@@ -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

View File

@@ -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"]

View File

@@ -19,7 +19,7 @@ spec:
storage:
size: {{ required ".Values.size is required" .Values.size }}
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClass: {{ . }}
{{- end }}

View File

@@ -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

View File

@@ -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"

View File

@@ -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 | `{}` |

View 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"]

View File

@@ -13,7 +13,85 @@ spec:
{{- end }}
persistence:
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
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 }}

View File

@@ -21,6 +21,11 @@
"type": "string",
"description": "StorageClass used to store the data",
"default": ""
},
"vhosts": {
"type": "object",
"description": "Virtual Hosts configuration",
"default": {}
}
}
}

View File

@@ -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: {}

View File

@@ -2,10 +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 HEAD
ferretdb 0.2.0 adaf603
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
@@ -25,11 +28,13 @@ kubernetes 0.7.0 ceefae03
kubernetes 0.8.0 ac11056e
kubernetes 0.8.1 e54608d8
kubernetes 0.8.2 5ca8823
kubernetes 0.9.0 HEAD
kubernetes 0.9.0 9b6dd19
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
@@ -38,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
@@ -59,7 +66,8 @@ tenant 1.4.0 HEAD
virtual-machine 0.1.4 f2015d6
virtual-machine 0.1.5 7cd7de7
virtual-machine 0.2.0 5ca8823
virtual-machine 0.3.0 HEAD
virtual-machine 0.3.0 b908400
virtual-machine 0.4.0 HEAD
vpn 0.1.0 f642698
vpn 0.2.0 7151424
vpn 0.3.0 HEAD

View File

@@ -17,7 +17,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

View File

@@ -3,7 +3,8 @@ include ../../../scripts/package.mk
generate:
readme-generator -v values.yaml -s values.schema.json.tmp -r README.md
cat values.schema.json.tmp | \
jq '.properties.image.enum = ["ubuntu", "cirros", "alpine", "fedora"]' | \
jq '.properties.resources.properties.memory["x-display"] = "slider"' \
jq '.properties.image.enum = ["ubuntu", "cirros", "alpine", "fedora", "talos"]' | \
jq '.properties.resources.properties.memory["x-display"] = "slider"' | \
jq '.properties.externalPorts.items.type = "integer"' \
> values.schema.json
rm -f values.schema.json.tmp

View File

@@ -9,51 +9,67 @@ The virtual machine is managed and hosted through KubeVirt, allowing you to harn
- Docs: [KubeVirt User Guide](https://kubevirt.io/user-guide/)
- GitHub: [KubeVirt Repository](https://github.com/kubevirt/kubevirt)
## Accessing virtual machine
You can access the virtual machine using the virtctl tool:
- [KubeVirt User Guide - Virtctl Client Tool](https://kubevirt.io/user-guide/user_workloads/virtctl_client_tool/)
To access the serial console:
```
virtctl console <vm>
```
To access the VM using VNC:
```
virtctl vnc <vm>
```
To SSH into the VM:
```
virtctl ssh <user>@<vm>
```
## Parameters
### Common parameters
| Name | Description | Value |
| ------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------- |
| `external` | Enable external access from outside the cluster | `false` |
| `running` | Determines if the virtual machine should be running | `true` |
| `image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora` | `ubuntu` |
| `storageClass` | StorageClass used to store the data | `replicated` |
| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `1` |
| `resources.memory` | The amount of memory allocated to the virtual machine | `1024M` |
| `resources.disk` | The size of the disk allocated for the virtual machine | `5Gi` |
| `sshPwauth` | Enable password authentication for SSH. If set to `true`, users can log in using a password | `true` |
| `disableRoot` | Disable root login via SSH. If set to `true`, root login will be disabled | `true` |
| `password` | The default password for the virtual machine | `hackme` |
| `chpasswdExpire` | Set whether the password should expire | `false` |
| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys | `["ssh-rsa ...","ssh-ed25519 ..."]` |
| Name | Description | Value |
| ------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------- |
| `external` | Enable external access from outside the cluster | `false` |
| `externalPorts` | Specify ports to forward from outside the cluster | `[]` |
| `running` | Determines if the virtual machine should be running | `true` |
| `image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` | `ubuntu` |
| `storageClass` | StorageClass used to store the data | `replicated` |
| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `1` |
| `resources.memory` | The amount of memory allocated to the virtual machine | `1024M` |
| `resources.disk` | The size of the disk allocated for the virtual machine | `5Gi` |
| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` |
| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config
` |
You can customize the exposed ports by specifying them under `service.ports` in the `values.yaml` file.
## Example `values.yaml`
## Example virtual machine:
```yaml
external: false
running: true
image: ubuntu
image: fedora
storageClass: replicated
resources:
cpu: 1
memory: 1024M
disk: 5Gi
sshPwauth: true
disableRoot: true
password: hackme
chpasswdExpire: false
sshKeys:
- YOUR_SSH_PUB_KEY_HERE
- ANOTHER_SSH_PUB_KEY_HERE
disk: 10Gi
service:
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 443
sshKeys:
- ssh-rsa ...
cloudInit: |
#cloud-config
user: fedora
password: fedora
chpasswd: { expire: False }
ssh_pwauth: True
```

View File

@@ -0,0 +1,21 @@
{{- if .Values.sshKeys }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "virtual-machine.fullname" $ }}-ssh-keys
stringData:
{{- range $k, $v := .Values.sshKeys }}
key{{ $k }}: {{ quote $v }}
{{- end }}
{{- end }}
{{- if .Values.cloudInit }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "virtual-machine.fullname" . }}-cloud-init
stringData:
userdata: |
{{- .Values.cloudInit | nindent 4 }}
{{- end }}

View File

@@ -8,21 +8,14 @@ metadata:
{{- include "virtual-machine.labels" . | nindent 4 }}
spec:
type: {{ ternary "LoadBalancer" "ClusterIP" .Values.external }}
{{- if .Values.external }}
externalTrafficPolicy: Local
allocateLoadBalancerNodePorts: false
{{- end }}
selector:
{{- include "virtual-machine.labels" . | nindent 4 }}
ports:
- name: ssh
port: 22
targetPort: 22
{{- if .Values.service.ports }}
{{- range .Values.service.ports }}
- name: {{ .name }}
port: {{ .port }}
targetPort: {{ .targetPort }}
{{- end }}
{{- range .Values.externalPorts }}
- name: port-{{ . }}
port: {{ . }}
targetPort: {{ . }}
{{- end }}
{{- end }}

View File

@@ -11,8 +11,9 @@ spec:
name: {{ include "virtual-machine.fullname" . }}
spec:
pvc:
volumeMode: Block
accessModes:
- ReadWriteOnce
- ReadWriteMany
resources:
requests:
storage: {{ .Values.resources.disk | quote }}
@@ -28,7 +29,9 @@ spec:
{{- else if eq .Values.image "fedora" }}
url: https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2
{{- else if eq .Values.image "alpine" }}
url: https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-virt-3.20.2-x86_64.iso
url: https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-x86_64-bios-tiny-r0.qcow2
{{- else if eq .Values.image "talos" }}
url: https://github.com/siderolabs/talos/releases/download/v1.7.6/nocloud-amd64.raw.xz
{{- end }}
template:
metadata:
@@ -45,34 +48,39 @@ spec:
- disk:
bus: scsi
name: systemdisk
{{- if or .Values.sshKeys .Values.cloudInit }}
- disk:
bus: virtio
name: cloudinitdisk
{{- end }}
interfaces:
- name: default
bridge: {}
machine:
type: ""
resources:
requests:
memory: {{ .Values.resources.memory | quote }}
{{- with .Values.sshKeys }}
accessCredentials:
- sshPublicKey:
source:
secret:
secretName: {{ include "virtual-machine.fullname" $ }}-ssh-keys
propagationMethod:
noCloud: {}
{{- end }}
terminationGracePeriodSeconds: 30
volumes:
- dataVolume:
- name: systemdisk
dataVolume:
name: {{ include "virtual-machine.fullname" . }}
name: systemdisk
- cloudInitNoCloud:
userData: |-
#cloud-config
ssh_pwauth: {{ if .Values.sshPwauth | default false }}True{{ else }}False{{ end }}
disable_root: {{ if .Values.disableRoot | default false }}True{{ else }}False{{ end }}
password: {{ .Values.password }}
chpasswd: { expire: {{ if .Values.chpasswdExpire | default false }}True{{ else }}False{{ end }} }
ssh_authorized_keys:
{{- if .Values.sshKeys }}
{{- $keys := .Values.sshKeys }}
{{- if not (kindIs "slice" $keys) }}
{{- $keys = list $keys }}
{{- end }}
{{- range $keys }}
- {{ . }}
{{- end }}
{{- end }}
name: cloudinitdisk
{{- if or .Values.sshKeys .Values.cloudInit }}
- name: cloudinitdisk
cloudInitNoCloud:
secretRef:
name: {{ include "virtual-machine.fullname" . }}-cloud-init
{{- end }}
networks:
- name: default
pod: {}

View File

@@ -7,6 +7,14 @@
"description": "Enable external access from outside the cluster",
"default": false
},
"externalPorts": {
"type": "array",
"description": "Specify ports to forward from outside the cluster",
"default": "[]",
"items": {
"type": "integer"
}
},
"running": {
"type": "boolean",
"description": "Determines if the virtual machine should be running",
@@ -14,13 +22,14 @@
},
"image": {
"type": "string",
"description": "The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora`",
"description": "The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos`",
"default": "ubuntu",
"enum": [
"ubuntu",
"cirros",
"alpine",
"fedora"
"fedora",
"talos"
]
},
"storageClass": {
@@ -49,36 +58,18 @@
}
}
},
"sshPwauth": {
"type": "boolean",
"description": "Enable password authentication for SSH. If set to `true`, users can log in using a password",
"default": true
},
"disableRoot": {
"type": "boolean",
"description": "Disable root login via SSH. If set to `true`, root login will be disabled",
"default": true
},
"password": {
"type": "string",
"description": "The default password for the virtual machine",
"default": "hackme"
},
"chpasswdExpire": {
"type": "boolean",
"description": "Set whether the password should expire",
"default": false
},
"sshKeys": {
"type": "array",
"description": "List of SSH public keys for authentication. Can be a single key or a list of keys",
"default": [
"ssh-rsa ...",
"ssh-ed25519 ..."
],
"description": "List of SSH public keys for authentication. Can be a single key or a list of keys.",
"default": "[]",
"items": {
"type": "string"
}
},
"cloudInit": {
"type": "string",
"description": "cloud-init user data config. See cloud-init documentation for more details.",
"default": "#cloud-config\n"
}
}
}

View File

@@ -1,19 +1,18 @@
## @section Common parameters
## @param external Enable external access from outside the cluster
## @param externalPorts [array] Specify ports to forward from outside the cluster
## @param running Determines if the virtual machine should be running
## @param image The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora`
## @param image The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos`
## @param storageClass StorageClass used to store the data
## @param resources.cpu The number of CPU cores allocated to the virtual machine
## @param resources.memory The amount of memory allocated to the virtual machine
## @param resources.disk The size of the disk allocated for the virtual machine
## @param sshPwauth Enable password authentication for SSH. If set to `true`, users can log in using a password
## @param disableRoot Disable root login via SSH. If set to `true`, root login will be disabled
## @param password The default password for the virtual machine
## @param chpasswdExpire Set whether the password should expire
## @param sshKeys List of SSH public keys for authentication. Can be a single key or a list of keys
external: false
externalPorts:
- 22
running: true
image: ubuntu
storageClass: replicated
@@ -21,10 +20,24 @@ resources:
cpu: 1
memory: 1024M
disk: 5Gi
sshPwauth: true
disableRoot: true
password: hackme
chpasswdExpire: false
sshKeys:
- ssh-rsa ...
- ssh-ed25519 ...
## @param sshKeys [array] List of SSH public keys for authentication. Can be a single key or a list of keys.
## Example:
## sshKeys:
## - ssh-rsa ...
## - ssh-ed25519 ...
##
sshKeys: []
## @param cloudInit cloud-init user data config. See cloud-init documentation for more details.
## - https://cloudinit.readthedocs.io/en/latest/explanation/format.html
## - https://cloudinit.readthedocs.io/en/latest/reference/examples.html
## Example:
## cloudInit: |
## #cloud-config
## password: ubuntu
## chpasswd: { expire: False }
##
cloudInit: |
#cloud-config

View File

@@ -1,2 +1,2 @@
cozystack:
image: ghcr.io/aenix-io/cozystack/cozystack:v0.12.0@sha256:0917812850fd0359d5ba78fd819c0e4ce6d7c12eed9cd46813e7284064b71d30
image: ghcr.io/aenix-io/cozystack/cozystack:v0.14.0@sha256:5a0269683feb4fff24e9044a41453dbedbc857ad450102b275e1d05aa3aec081

View File

@@ -20,14 +20,11 @@ releases:
namespace: cozy-cilium
privileged: true
dependsOn: []
valuesFiles:
- values.yaml
- values-talos.yaml
values:
cilium:
bpf:
masquerade: true
cni:
chainingMode: ~
customConf: false
configMap: ""
enableIPv4Masquerade: true
enableIdentityMark: true
ipv4NativeRoutingCIDR: "{{ index $cozyConfig.data "ipv4-pod-cidr" }}"

View File

@@ -20,6 +20,10 @@ releases:
namespace: cozy-cilium
privileged: true
dependsOn: []
valuesFiles:
- values.yaml
- values-talos.yaml
- values-kubeovn.yaml
- name: kubeovn
releaseName: kubeovn

View File

@@ -39,6 +39,10 @@ spec:
kind: HelmRepository
name: cozystack-system
namespace: cozy-system
{{- with $x.valuesFiles }}
valuesFiles:
{{- toYaml $x.valuesFiles | nindent 6 }}
{{- end }}
{{- $values := dict }}
{{- with $x.values }}
{{- $values = merge . $values }}

View File

@@ -10,6 +10,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: cozystack-e2e-{{ .Release.Name }}
namespace: cozy-e2e-tests
spec:
replicas: 1
selector:

View File

@@ -1,2 +1,2 @@
e2e:
image: ghcr.io/aenix-io/cozystack/e2e-sandbox:v0.12.0@sha256:be1693c8ce6a9522499f79b1e42b2e08c7ca80405026a095299e5e990a3ab791
image: ghcr.io/aenix-io/cozystack/e2e-sandbox:v0.14.0@sha256:be1693c8ce6a9522499f79b1e42b2e08c7ca80405026a095299e5e990a3ab791

View File

@@ -25,7 +25,7 @@ spec:
resources:
requests:
storage: {{ .Values.size }}
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
security:

View File

@@ -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"

View File

@@ -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 }}

View File

@@ -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
@@ -27,3 +27,6 @@ metadata:
spec:
replicaCount: 2
configSecret: alertmanager
podMetadata:
labels:
policy.cozystack.io/allow-to-apiserver: "true"

View File

@@ -34,7 +34,7 @@ spec:
- name: data1
type: "persistentVolumeClaim"
size: "{{ .Values.size }}"
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClass: {{ . }}
{{- end }}
maxVolumes: 0
@@ -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:

View File

@@ -11,6 +11,7 @@ monitoring 1.0.0 f642698
monitoring 1.1.0 15478a88
monitoring 1.2.0 c9e0d63b
monitoring 1.2.1 4471b4ba
monitoring 1.3.0 HEAD
monitoring 1.3.0 6c5cf5b
monitoring 1.4.0 HEAD
seaweedfs 0.1.0 5ca8823
seaweedfs 0.2.0 HEAD

View File

@@ -0,0 +1,19 @@
cilium:
sctp:
enabled: true
autoDirectNodeRoutes: false
kubeProxyReplacement: true
bpf:
masquerade: false
cni:
chainingMode: generic-veth
chainingTarget: kube-ovn
customConf: true
configMap: cni-configuration
routingMode: native
enableIPv4Masquerade: false
enableIPv6Masquerade: false
enableIdentityMark: false
enableRuntimeDeviceDetection: true
forceDeviceDetection: true
devices: ovn0

View File

@@ -0,0 +1,7 @@
cilium:
cgroup:
autoMount:
enabled: false
hostRoot: /sys/fs/cgroup
k8sServiceHost: localhost
k8sServicePort: 7445

View File

@@ -3,35 +3,12 @@ cilium:
enabled: false
externalIPs:
enabled: true
autoDirectNodeRoutes: false
kubeProxyReplacement: true
bpf:
masquerade: false
hostLegacyRouting: false
nodePort:
enabled: true
loadBalancer:
algorithm: maglev
cgroup:
autoMount:
enabled: false
hostRoot: /sys/fs/cgroup
ipam:
mode: "kubernetes"
k8sServiceHost: localhost
k8sServicePort: 7445
cni:
chainingMode: generic-veth
customConf: true
configMap: cni-configuration
routingMode: native
enableIPv4Masquerade: false
enableIPv6Masquerade: false
enableIdentityMark: false
enableRuntimeDeviceDetection: true
forceDeviceDetection: true
devices: ovn0
extraEnv:
- name: CILIUM_ENFORCE_DEVICE_DETECTION
value: "true"
image:
repository: ghcr.io/aenix-io/cozystack/cilium
tag: 1.16.1

View File

@@ -33,11 +33,11 @@ kubeapps:
image:
registry: ghcr.io/aenix-io/cozystack
repository: dashboard
tag: v0.12.0
digest: sha256:4818712e9fc9c57cc321512760c3226af564a04e69d4b3ec9229ab91fd39abeb
tag: v0.14.0
digest: "sha256:4818712e9fc9c57cc321512760c3226af564a04e69d4b3ec9229ab91fd39abeb"
kubeappsapis:
image:
registry: ghcr.io/aenix-io/cozystack
repository: kubeapps-apis
tag: v0.12.0
digest: "sha256:5eee4c2207f23a6d5317c08bbedfd71b8b22f733b834cd370f1313fb428a22d0"
tag: v0.14.0
digest: "sha256:7918268647b8f4862f312df9ba42e9edfd2f703223259e2e8b9e02da1ad71cc4"

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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"

View File

@@ -7,18 +7,45 @@ linkTitle: "Helm installation"
[grafana-operator](https://github.com/grafana/grafana-operator) for Kubernetes to manage Grafana instances and grafana resources.
![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5.6.0](https://img.shields.io/badge/AppVersion-v5.6.0-informational?style=flat-square)
![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5.12.0](https://img.shields.io/badge/AppVersion-v5.12.0-informational?style=flat-square)
## 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. |

View File

@@ -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)

View File

@@ -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: {}

View File

@@ -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: {}

View File

@@ -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:

View File

@@ -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:

View File

@@ -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

View File

@@ -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: {}

View File

@@ -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

View File

@@ -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

View File

@@ -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 }}
{{/*

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,4 @@
{{ range .Values.extraObjects }}
---
{{ tpl (toYaml .) $ }}
{{ end }}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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

View File

@@ -3,5 +3,5 @@ kamaji:
deploy: false
image:
pullPolicy: IfNotPresent
tag: v0.12.0@sha256:197d7c36f76d4d9c09cc82eb87f9e36f05799a2b9158ae27e4729f2dd636ad0d
tag: v0.14.0@sha256:47bf03ba0f5a4c25eb53df94a1962bbd2423b1b3d027de26945b06a363eebf2e
repository: ghcr.io/aenix-io/cozystack/kamaji

View File

@@ -22,4 +22,4 @@ global:
images:
kubeovn:
repository: kubeovn
tag: v1.13.0@sha256:55b3ed5d4b628216378040e445aadc3d1cd817ff4d17eb081d884c6e00fb51e2
tag: v1.13.0@sha256:5c27a22f6b0a19c9a546e838a80ef73c32b863278cc209d7393555ad8a4f744a

View File

@@ -6,6 +6,7 @@ spec:
config:
featureGates:
- HonorWaitForFirstConsumer
- ExpandDisks
imagePullPolicy: IfNotPresent
infra:
nodeSelector:

View File

@@ -10,6 +10,7 @@ spec:
developerConfiguration:
featureGates:
- HotplugVolumes
- ExpandDisks
customizeComponents: {}
imagePullPolicy: IfNotPresent
workloadUpdateStrategy: {}

View File

@@ -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

View File

@@ -6,13 +6,13 @@
<img src="https://mariadb-operator.github.io/mariadb-operator/assets/mariadb-operator_centered_whitebg.svg" alt="mariadb" width="100%"/>
</p>
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.28.1](https://img.shields.io/badge/Version-0.28.1-informational?style=flat-square) ![AppVersion: v0.0.28](https://img.shields.io/badge/AppVersion-v0.0.28-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.30.0](https://img.shields.io/badge/Version-0.30.0-informational?style=flat-square) ![AppVersion: v0.0.30](https://img.shields.io/badge/AppVersion-v0.0.30-informational?style=flat-square)
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 Certificates 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 |

View File

@@ -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.)

View File

@@ -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
*/}}

View File

@@ -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

View File

@@ -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 }}

Some files were not shown because too many files have changed in this diff Show More