Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Secrets Operator Onboarding #421

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions external-secrets/Pluralfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REPO external-secrets
ATTRIBUTES Plural repository.yaml

TF terraform/*
HELM helm/*
RECIPE plural/recipes/*
TAG plural/tags/**/*
23 changes: 23 additions & 0 deletions external-secrets/helm/external-secrets/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
6 changes: 6 additions & 0 deletions external-secrets/helm/external-secrets/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: external-secrets
repository: https://charts.external-secrets.io
version: 0.6.1
digest: sha256:8cca4f790ab275f82a8bd0a28de14ac780e1fa13871aa692cf77cc05cfee6d53
generated: "2022-11-02T13:38:03.697892+02:00"
10 changes: 10 additions & 0 deletions external-secrets/helm/external-secrets/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
name: external-secrets
description: helm chart for external-secrets
type: application
version: 0.1.1
appVersion: "0.6.1"
dependencies:
- name: external-secrets
repository: https://charts.external-secrets.io
version: 0.6.1
1 change: 1 addition & 0 deletions external-secrets/helm/external-secrets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A helm chart for external-secrets
Binary file not shown.
6,450 changes: 6,450 additions & 0 deletions external-secrets/helm/external-secrets/crds/bundle.yaml

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions external-secrets/helm/external-secrets/deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: plural.sh/v1alpha1
kind: Dependencies
metadata:
application: true
description: Deploys external-secrets crafted for the target cloud
spec:
dependencies:
- type: helm
name: bootstrap
repo: bootstrap
version: '>= 0.5.1'
- type: terraform
name: aws
repo: external-secrets
version: '>= 0.1.1'
optional: true
- type: terraform
name: azure
repo: external-secrets
version: '>= 0.1.0'
optional: true
- type: terraform
name: gcp
repo: external-secrets
version: '>= 0.1.0'
optional: true
145 changes: 145 additions & 0 deletions external-secrets/helm/external-secrets/runbooks/scaling-manual.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<root gap='medium'>
<box pad='small' gap='medium' direction='row' align='center'>
<button label='Scale' action='scale' primary='true' headline='true' />
<box direction='row' align='center' gap='small'>
<box gap='small' align='center'>
<timeseries datasource="external-secrets-cpu" label="External Secrets CPU Usage" />
<text size='small'>You should set a requests to
roughly correspond to 80% regular utilization</text>
<text size='small'>Normally a CPU limit is not required</text>
</box>
<box gap='small' align='center'>
<timeseries datasource="external-secrets-memory" label="External Secrets Memory Usage" />
<text size='small'>You should set a requests to
roughly correspond to 80% regular utilization</text>
<text size='small'>A memory limit should be set to avoid resource starvation</text>
</box>
</box>
<box gap='xsmall'>
<box gap='xsmall'>
<input placeholder="250m" label='External Secrets CPU Request' name='external-secrets-cpu'>
<valueFrom
datasource="external-secrets"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.cpu" />
</input>
<input placeholder="1Gi" label='External Secrets Memory Request' name='external-secrets-memory'>
<valueFrom
datasource="external-secrets"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.memory" />
</input>
</box>
<box gap='xsmall'>
<input placeholder="250m" label='External Secrets CPU Limit' name='external-secrets-cpu-limit'>
<valueFrom
datasource="external-secrets"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.limits.cpu" />
</input>
<input placeholder="1Gi" label='External Secrets Memory Limit' name='external-secrets-memory-limit'>
<valueFrom
datasource="external-secrets"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.limits.memory" />
</input>
</box>
</box>
</box>
<box pad='small' gap='medium' direction='row' align='center'>
<box direction='row' align='center' gap='small'>
<box gap='small' align='center'>
<timeseries datasource="external-secrets-controller-cpu" label="External Secrets Controller CPU Usage" />
<text size='small'>You should set a requests to
roughly correspond to 80% regular utilization</text>
<text size='small'>Normally a CPU limit is not required</text>
</box>
<box gap='small' align='center'>
<timeseries datasource="external-secrets-controller-memory" label="External Secrets Controller Memory Usage" />
<text size='small'>You should set a requests to
roughly correspond to 80% regular utilization</text>
<text size='small'>A memory limit should be set to avoid resource starvation</text>
</box>
</box>
<box gap='xsmall'>
<box gap='xsmall'>
<input placeholder="250m" label='External Secrets Controller CPU Request' name='external-secrets-controller-cpu'>
<valueFrom
datasource="external-secrets-controller"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.cpu" />
</input>
<input placeholder="1Gi" label='External Secrets Controller Memory Request' name='external-secrets-controller-memory'>
<valueFrom
datasource="external-secrets-controller"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.memory" />
</input>
</box>
<box gap='xsmall'>
<input placeholder="250m" label='External Secrets Controller CPU Limit' name='external-secrets-controller-cpu-limit'>
<valueFrom
datasource="external-secrets-controller"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.limits.cpu" />
</input>
<input placeholder="1Gi" label='External Secrets Controller Memory Limit' name='external-secrets-controller-memory-limit'>
<valueFrom
datasource="external-secrets-controller"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.limits.memory" />
</input>
</box>
</box>
</box>
<box pad='small' gap='medium' direction='row' align='center'>
<box direction='row' align='center' gap='small'>
<box gap='small' align='center'>
<timeseries datasource="external-secrets-webhook-cpu" label="External Secrets Webhook CPU Usage" />
<text size='small'>You should set a requests to
roughly correspond to 80% regular utilization</text>
<text size='small'>Normally a CPU limit is not required</text>
</box>
<box gap='small' align='center'>
<timeseries datasource="external-secrets-webhook-memory" label="External Secrets Webhook Memory Usage" />
<text size='small'>You should set a requests to
roughly correspond to 80% regular utilization</text>
<text size='small'>A memory limit should be set to avoid resource starvation</text>
</box>
</box>
<box gap='xsmall'>
<box gap='xsmall'>
<input placeholder="250m" label='External Secrets Webhook CPU Request' name='external-secrets-webhook-cpu'>
<valueFrom
datasource="external-secrets-webhook"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.cpu" />
</input>
<input placeholder="1Gi" label='External Secrets Webhook Memory Request' name='external-secrets-webhook-memory'>
<valueFrom
datasource="external-secrets-webhook"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.memory" />
</input>
</box>
<box gap='xsmall'>
<input placeholder="250m" label='External Secrets Webhook CPU Limit' name='external-secrets-webhook-cpu-limit'>
<valueFrom
datasource="external-secrets-webhook"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.limits.cpu" />
</input>
<input placeholder="1Gi" label='External Secrets Webhook Memory Limit' name='external-secrets-webhook-memory-limit'>
<valueFrom
datasource="external-secrets-webhook"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.limits.memory" />
</input>
</box>
</box>
</box>
<box width='100%' gap='small'>
<text size='small'>Be sure to scale your External Secrets components within the capacity of your nodes.</text>
<text size='small'>By default this is a maximum of 8 CPU and 32 Gi memory.</text>
</box>
</root>
62 changes: 62 additions & 0 deletions external-secrets/helm/external-secrets/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "external-secrets-plural.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 "external-secrets-plural.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 "external-secrets-plural.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "external-secrets-plural.labels" -}}
helm.sh/chart: {{ include "external-secrets-plural.chart" . }}
{{ include "external-secrets-plural.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "external-secrets-plural.selectorLabels" -}}
app.kubernetes.io/name: {{ include "external-secrets-plural.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "external-secrets-plural.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "external-secrets-plural.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.clusterSecretStore.create -}}
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
name: default
spec:
{{- with .Values.clusterSecretStore.provider }}
provider:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end -}}
Loading