Skip to content

Commit bb2c835

Browse files
Merge pull request #111 from pluralsh/final-touches
Final touches on setup for plural cloud
2 parents 9fba7c7 + d8b6cfd commit bb2c835

File tree

12 files changed

+565
-0
lines changed

12 files changed

+565
-0
lines changed

charts/plural-operator/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/plural-operator/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: plural-operator
3+
description: A Helm chart for deploying the v1 plural operator, which is primarily responsible for managing our oauth proxy injector admission controller.
4+
type: application
5+
version: 0.1.0
6+
appVersion: "1.16.0"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "plural-operator.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "plural-operator.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "plural-operator.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "plural-operator.labels" -}}
37+
helm.sh/chart: {{ include "plural-operator.chart" . }}
38+
{{ include "plural-operator.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "plural-operator.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "plural-operator.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "plural-operator.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "plural-operator.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: plural-operator-oauth-sidecar-config
5+
data:
6+
oauth-sidecar-config.yaml: |
7+
containers:
8+
- name: oauth2-proxy
9+
image: dkr.plural.sh/oauth2-proxy/oauth2-proxy/oauth2-proxy:v7.3.0
10+
imagePullPolicy: IfNotPresent
11+
resources:
12+
requests:
13+
cpu: 25m
14+
memory: 50Mi
15+
limits:
16+
memory: 50Mi
17+
ports:
18+
- name: oauth-http
19+
containerPort: 4180
20+
protocol: TCP
21+
- name: oauth-metrics
22+
containerPort: 44180
23+
protocol: TCP
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: cert-manager.io/v1
2+
kind: Issuer
3+
metadata:
4+
name: plural-operator-selfsigned-issuer
5+
spec:
6+
selfSigned: {}
7+
---
8+
apiVersion: cert-manager.io/v1
9+
kind: Certificate
10+
metadata:
11+
name: plural-operator-serving-cert
12+
spec:
13+
dnsNames:
14+
- plural-operator-webhook-service.{{ .Release.Namespace }}.svc
15+
- plural-operator-webhook-service.{{ .Release.Namespace }}.svc.cluster.local
16+
issuerRef:
17+
kind: Issuer
18+
name: plural-operator-selfsigned-issuer
19+
secretName: plural-operator-webhook-server-cert

0 commit comments

Comments
 (0)