From a1c60282cb44ba6c5d78eebc324be927d68488ed Mon Sep 17 00:00:00 2001 From: Gottox Date: Sat, 8 Feb 2025 22:10:12 +0000 Subject: [PATCH] automatic pipeline release at withlazers/auto-secret-operator v0.0.1 Source: https://github.com/withlazers/auto-secret-operator/commit/238aff5ea38aff1ef81cda4b4f4d25294aac67ea --- charts/auto-secret-operator/.helmignore | 23 +++++++ charts/auto-secret-operator/Chart.yaml | 12 ++++ charts/auto-secret-operator/README.md | 51 +++++++++++++++ .../auto-secret-operator/templates/NOTES.txt | 1 + .../templates/_helpers.tpl | 62 ++++++++++++++++++ .../templates/clusterrole.yaml | 21 ++++++ .../templates/clusterrolebinding.yaml | 18 +++++ .../templates/deployment.yaml | 65 +++++++++++++++++++ .../templates/serviceaccount.yaml | 13 ++++ .../auto-secret-operator/values-minikube.yaml | 7 ++ charts/auto-secret-operator/values.yaml | 61 +++++++++++++++++ 11 files changed, 334 insertions(+) create mode 100644 charts/auto-secret-operator/.helmignore create mode 100644 charts/auto-secret-operator/Chart.yaml create mode 100644 charts/auto-secret-operator/README.md create mode 100644 charts/auto-secret-operator/templates/NOTES.txt create mode 100644 charts/auto-secret-operator/templates/_helpers.tpl create mode 100644 charts/auto-secret-operator/templates/clusterrole.yaml create mode 100644 charts/auto-secret-operator/templates/clusterrolebinding.yaml create mode 100644 charts/auto-secret-operator/templates/deployment.yaml create mode 100644 charts/auto-secret-operator/templates/serviceaccount.yaml create mode 100644 charts/auto-secret-operator/values-minikube.yaml create mode 100644 charts/auto-secret-operator/values.yaml diff --git a/charts/auto-secret-operator/.helmignore b/charts/auto-secret-operator/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/auto-secret-operator/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/auto-secret-operator/Chart.yaml b/charts/auto-secret-operator/Chart.yaml new file mode 100644 index 0000000..c1491c2 --- /dev/null +++ b/charts/auto-secret-operator/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: auto-secret-operator +description: | + The helm-chart for the auto-secret-operator +type: application +home: https://github.com/withlazers/auto-secret-operator +maintainers: + - name: Enno Boland + email: mail@eboland.de + url: https://github.com/Gottox +version: 0.0.1 +appVersion: "v0.0.1" diff --git a/charts/auto-secret-operator/README.md b/charts/auto-secret-operator/README.md new file mode 100644 index 0000000..34f2bd6 --- /dev/null +++ b/charts/auto-secret-operator/README.md @@ -0,0 +1,51 @@ +# auto-secret-operator + +![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.1](https://img.shields.io/badge/AppVersion-v0.0.1-informational?style=flat-square) + +The helm-chart for the auto-secret-operator + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Enno Boland | | | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| application.defaultLength | int | `32` | | +| application.logLevel | string | `"info"` | one of error, warn, info, debug, trace. Also supports the [env_logger format](https://docs.rs/env_logger/latest/env_logger/#enabling-logging) | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"withlazers/auto-secret-operator"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| livenessProbe.httpGet.path | string | `"/healthz"` | | +| livenessProbe.httpGet.port | string | `"http"` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.httpGet.path | string | `"/healthz"` | | +| readinessProbe.httpGet.port | string | `"http"` | | +| replicaCount | int | `1` | must be 1. The auto-secret-operator currently does not support multiple replicas. | +| resources.limits.cpu | string | `"100m"` | | +| resources.limits.memory | string | `"128Mi"` | | +| resources.requests.cpu | string | `"50m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| securityContext.capabilities.drop[0] | string | `"ALL"` | | +| securityContext.readOnlyRootFilesystem | bool | `true` | | +| securityContext.runAsNonRoot | bool | `true` | | +| securityContext.runAsUser | int | `1000` | | +| service.port | int | `8080` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | + diff --git a/charts/auto-secret-operator/templates/NOTES.txt b/charts/auto-secret-operator/templates/NOTES.txt new file mode 100644 index 0000000..1de7578 --- /dev/null +++ b/charts/auto-secret-operator/templates/NOTES.txt @@ -0,0 +1 @@ +Congratulations! You have successfully installed auto-secret! diff --git a/charts/auto-secret-operator/templates/_helpers.tpl b/charts/auto-secret-operator/templates/_helpers.tpl new file mode 100644 index 0000000..8cc1179 --- /dev/null +++ b/charts/auto-secret-operator/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "auto-secret-operator.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "auto-secret-operator.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "auto-secret-operator.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "auto-secret-operator.labels" -}} +helm.sh/chart: {{ include "auto-secret-operator.chart" . }} +{{ include "auto-secret-operator.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "auto-secret-operator.selectorLabels" -}} +app.kubernetes.io/name: {{ include "auto-secret-operator.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "auto-secret-operator.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "auto-secret-operator.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/auto-secret-operator/templates/clusterrole.yaml b/charts/auto-secret-operator/templates/clusterrole.yaml new file mode 100644 index 0000000..be8e173 --- /dev/null +++ b/charts/auto-secret-operator/templates/clusterrole.yaml @@ -0,0 +1,21 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "auto-secret-operator.serviceAccountName" . }} + labels: + {{- include "auto-secret-operator.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - patch +{{- end }} diff --git a/charts/auto-secret-operator/templates/clusterrolebinding.yaml b/charts/auto-secret-operator/templates/clusterrolebinding.yaml new file mode 100644 index 0000000..7414582 --- /dev/null +++ b/charts/auto-secret-operator/templates/clusterrolebinding.yaml @@ -0,0 +1,18 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "auto-secret-operator.serviceAccountName" . }} + labels: {{- include "auto-secret-operator.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +subjects: +- kind: ServiceAccount + name: {{ include "auto-secret-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ include "auto-secret-operator.serviceAccountName" . }} + apiGroup: rbac.authorization.k8s.io +{{- end }} diff --git a/charts/auto-secret-operator/templates/deployment.yaml b/charts/auto-secret-operator/templates/deployment.yaml new file mode 100644 index 0000000..83b5a63 --- /dev/null +++ b/charts/auto-secret-operator/templates/deployment.yaml @@ -0,0 +1,65 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "auto-secret-operator.fullname" . }} + labels: + {{- include "auto-secret-operator.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "auto-secret-operator.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "auto-secret-operator.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "auto-secret-operator.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + {{- with .Values.application.defaultLength }} + - --default-length={{ . }} + {{- end }} + env: + - name: RUST_LOG + value: {{ .Values.application.logLevel }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/auto-secret-operator/templates/serviceaccount.yaml b/charts/auto-secret-operator/templates/serviceaccount.yaml new file mode 100644 index 0000000..fadee86 --- /dev/null +++ b/charts/auto-secret-operator/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "auto-secret-operator.serviceAccountName" . }} + labels: + {{- include "auto-secret-operator.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/charts/auto-secret-operator/values-minikube.yaml b/charts/auto-secret-operator/values-minikube.yaml new file mode 100644 index 0000000..7792331 --- /dev/null +++ b/charts/auto-secret-operator/values-minikube.yaml @@ -0,0 +1,7 @@ +image: + repository: localhost/auto-secret + tag: latest + pullPolicy: IfNotPresent + +application: + logLevel: debug diff --git a/charts/auto-secret-operator/values.yaml b/charts/auto-secret-operator/values.yaml new file mode 100644 index 0000000..4a1c30c --- /dev/null +++ b/charts/auto-secret-operator/values.yaml @@ -0,0 +1,61 @@ +# -- must be 1. The auto-secret-operator currently does not support multiple replicas. +replicaCount: 1 + +application: + # -- one of error, warn, info, debug, trace. Also supports the [env_logger format](https://docs.rs/env_logger/latest/env_logger/#enabling-logging) + logLevel: "info" + defaultLength: 32 + +image: + repository: withlazers/auto-secret-operator + pullPolicy: IfNotPresent + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + create: true + automount: true + annotations: {} + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: {} + +securityContext: + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + +resources: + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 50m + memory: 128Mi + +livenessProbe: + httpGet: + path: /healthz + port: http +readinessProbe: + httpGet: + path: /healthz + port: http + +service: + port: 8080 + +nodeSelector: {} + +tolerations: [] + +affinity: {}