git.iko.soy/typeable/oauth2-proxy
on master help sign in
* move httpbin and hello-world charts outside.

* expose kind to 443 port * make helm optional * rename folder to kubernetes

commit11c033e2c8468cf5280c9250d529da100ad22dbb authorEvgeni Gordeev <egordeev@conserviscorp.com> dateTue 16 Jun 2020, 16:39 (6 years ago) parent9a495e9
25 files changed+660−636
CHANGELOG.md+1−1 contrib/helm/Chart.lock−15 contrib/helm/hello-world/Chart.yaml−23 contrib/helm/hello-world/templates/_helpers.tpl−63 contrib/helm/hello-world/templates/deployment.yaml−61 contrib/helm/hello-world/templates/ingress.yaml−41 contrib/helm/hello-world/templates/service.yaml−15 contrib/helm/hello-world/templates/serviceaccount.yaml−12 contrib/helm/hello-world/values.yaml−79 contrib/helm/httpbin/Chart.yaml−23 contrib/helm/httpbin/templates/_helpers.tpl−63 contrib/helm/httpbin/templates/deployment.yaml−61 contrib/helm/httpbin/templates/ingress.yaml−41 contrib/helm/httpbin/templates/service.yaml−15 contrib/helm/httpbin/templates/serviceaccount.yaml−12 contrib/helm/httpbin/values.yaml−79 contrib/helm/.gitignore → contrib/kubernetes/.gitignore contrib/kubernetes/Chart.lock contrib/helm/Chart.yaml → contrib/kubernetes/Chart.yaml+7−7 contrib/helm/Makefile → contrib/kubernetes/Makefile+36−14 contrib/helm/README.md → contrib/kubernetes/README.md+6−5 contrib/helm/custom-dns.yaml → contrib/kubernetes/custom-dns.yaml contrib/helm/kind-cluster.yaml → contrib/kubernetes/kind-cluster.yaml+3 contrib/kubernetes/oauth2-proxy-example-full.yaml+605 contrib/helm/values.yaml → contrib/kubernetes/values.yaml+2−6
CHANGELOG.md+1−1
@@ -55,7 +55,7 @@
5555
5656## Changes since v5.1.1
5757
58−- [#615](https://github.com/oauth2-proxy/oauth2-proxy/pull/615) Helm Example based on Kind cluster and Nginx ingress (@EvgeniGordeev)
58+- [#615](https://github.com/oauth2-proxy/oauth2-proxy/pull/615) Kubernetes example based on Kind cluster and Nginx ingress (@EvgeniGordeev)
5959- [#604](https://github.com/oauth2-proxy/oauth2-proxy/pull/604) Add Keycloak local testing environment (@EvgeniGordeev)
6060- [#539](https://github.com/oauth2-proxy/oauth2-proxy/pull/539) Refactor encryption ciphers and add AES-GCM support (@NickMeves)
6161- [#601](https://github.com/oauth2-proxy/oauth2-proxy/pull/601) Ensure decrypted user/email are valid UTF8 (@JoelSpeed)
contrib/helm/Chart.lockdeleted−15
@@ -1,15 +0,0 @@
1−dependencies:
2−- name: dex
3− repository: https://kubernetes-charts.storage.googleapis.com
4− version: 2.11.0
5−- name: oauth2-proxy
6− repository: https://kubernetes-charts.storage.googleapis.com
7− version: 3.1.0
8−- name: httpbin
9− repository: file://./httpbin
10− version: 0.6.1
11−- name: hello-world
12− repository: file://./hello-world
13− version: 0.0.1
14−digest: sha256:b5fe4db7a523b28321708a12ae0d2608ea32836b322ae7941c820b626a180af2
15−generated: "2020-06-12T13:10:21.718689-05:00"
contrib/helm/hello-world/Chart.yamldeleted−23
@@ -1,23 +0,0 @@
1−apiVersion: v2
2−name: hello-world
3−description: A Helm chart for Kubernetes
4−
5−# A chart can be either an 'application' or a 'library' chart.
6−#
7−# Application charts are a collection of templates that can be packaged into versioned archives
8−# to be deployed.
9−#
10−# Library charts provide useful utilities or functions for the chart developer. They're included as
11−# a dependency of application charts to inject those utilities and functions into the rendering
12−# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13−type: application
14−
15−# This is the chart version. This version number should be incremented each time you make changes
16−# to the chart and its templates, including the app version.
17−# Versions are expected to follow Semantic Versioning (https://semver.org/)
18−version: 0.0.1
19−
20−# This is the version number of the application being deployed. This version number should be
21−# incremented each time you make changes to the application. Versions are not expected to
22−# follow Semantic Versioning. They should reflect the version the application is using.
23−appVersion: 0.0.1
contrib/helm/hello-world/templates/_helpers.tpldeleted−63
@@ -1,63 +0,0 @@
1−{{/* vim: set filetype=mustache: */}}
2−{{/*
3−Expand the name of the chart.
4−*/}}
5−{{- define "helloWorld.name" -}}
6−{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
7−{{- end }}
8−
9−{{/*
10−Create a default fully qualified app name.
11−We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12−If release name contains chart name it will be used as a full name.
13−*/}}
14−{{- define "helloWorld.fullname" -}}
15−{{- if .Values.fullnameOverride }}
16−{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
17−{{- else }}
18−{{- $name := default .Chart.Name .Values.nameOverride }}
19−{{- if contains $name .Release.Name }}
20−{{- .Release.Name | trunc 63 | trimSuffix "-" }}
21−{{- else }}
22−{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
23−{{- end }}
24−{{- end }}
25−{{- end }}
26−
27−{{/*
28−Create chart name and version as used by the chart label.
29−*/}}
30−{{- define "helloWorld.chart" -}}
31−{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32−{{- end }}
33−
34−{{/*
35−Common labels
36−*/}}
37−{{- define "helloWorld.labels" -}}
38−helm.sh/chart: {{ include "helloWorld.chart" . }}
39−{{ include "helloWorld.selectorLabels" . }}
40−{{- if .Chart.AppVersion }}
41−app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
42−{{- end }}
43−app.kubernetes.io/managed-by: {{ .Release.Service }}
44−{{- end }}
45−
46−{{/*
47−Selector labels
48−*/}}
49−{{- define "helloWorld.selectorLabels" -}}
50−app.kubernetes.io/name: {{ include "helloWorld.name" . }}
51−app.kubernetes.io/instance: {{ .Release.Name }}
52−{{- end }}
53−
54−{{/*
55−Create the name of the service account to use
56−*/}}
57−{{- define "helloWorld.serviceAccountName" -}}
58−{{- if .Values.serviceAccount.create }}
59−{{- default (include "helloWorld.fullname" .) .Values.serviceAccount.name }}
60−{{- else }}
61−{{- default "default" .Values.serviceAccount.name }}
62−{{- end }}
63−{{- end }}
contrib/helm/hello-world/templates/deployment.yamldeleted−61
@@ -1,61 +0,0 @@
1−apiVersion: apps/v1
2−kind: Deployment
3−metadata:
4− name: {{ include "helloWorld.fullname" . }}
5− labels:
6− {{- include "helloWorld.labels" . | nindent 4 }}
7−spec:
8−{{- if not .Values.autoscaling.enabled }}
9− replicas: {{ .Values.replicaCount }}
10−{{- end }}
11− selector:
12− matchLabels:
13− {{- include "helloWorld.selectorLabels" . | nindent 6 }}
14− template:
15− metadata:
16− {{- with .Values.podAnnotations }}
17− annotations:
18− {{- toYaml . | nindent 8 }}
19− {{- end }}
20− labels:
21− {{- include "helloWorld.selectorLabels" . | nindent 8 }}
22− spec:
23− {{- with .Values.imagePullSecrets }}
24− imagePullSecrets:
25− {{- toYaml . | nindent 8 }}
26− {{- end }}
27− serviceAccountName: {{ include "helloWorld.serviceAccountName" . }}
28− securityContext:
29− {{- toYaml .Values.podSecurityContext | nindent 8 }}
30− containers:
31− - name: {{ .Chart.Name }}
32− securityContext:
33− {{- toYaml .Values.securityContext | nindent 12 }}
34− image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
35− imagePullPolicy: {{ .Values.image.pullPolicy }}
36− ports:
37− - name: http
38− containerPort: 80
39− protocol: TCP
40− livenessProbe:
41− httpGet:
42− path: /
43− port: http
44− readinessProbe:
45− httpGet:
46− path: /
47− port: http
48− resources:
49− {{- toYaml .Values.resources | nindent 12 }}
50− {{- with .Values.nodeSelector }}
51− nodeSelector:
52− {{- toYaml . | nindent 8 }}
53− {{- end }}
54− {{- with .Values.affinity }}
55− affinity:
56− {{- toYaml . | nindent 8 }}
57− {{- end }}
58− {{- with .Values.tolerations }}
59− tolerations:
60− {{- toYaml . | nindent 8 }}
61− {{- end }}
contrib/helm/hello-world/templates/ingress.yamldeleted−41
@@ -1,41 +0,0 @@
1−{{- if .Values.ingress.enabled -}}
2−{{- $fullName := include "helloWorld.fullname" . -}}
3−{{- $svcPort := .Values.service.port -}}
4−{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
5−apiVersion: networking.k8s.io/v1beta1
6−{{- else -}}
7−apiVersion: extensions/v1beta1
8−{{- end }}
9−kind: Ingress
10−metadata:
11− name: {{ $fullName }}
12− labels:
13− {{- include "helloWorld.labels" . | nindent 4 }}
14− {{- with .Values.ingress.annotations }}
15− annotations:
16− {{- toYaml . | nindent 4 }}
17− {{- end }}
18−spec:
19− {{- if .Values.ingress.tls }}
20− tls:
21− {{- range .Values.ingress.tls }}
22− - hosts:
23− {{- range .hosts }}
24− - {{ . | quote }}
25− {{- end }}
26− secretName: {{ .secretName }}
27− {{- end }}
28− {{- end }}
29− rules:
30− {{- range .Values.ingress.hosts }}
31− - host: {{ .host | quote }}
32− http:
33− paths:
34− {{- range .paths }}
35− - path: {{ . }}
36− backend:
37− serviceName: {{ $fullName }}
38− servicePort: {{ $svcPort }}
39− {{- end }}
40− {{- end }}
41− {{- end }}
contrib/helm/hello-world/templates/service.yamldeleted−15
@@ -1,15 +0,0 @@
1−apiVersion: v1
2−kind: Service
3−metadata:
4− name: {{ include "helloWorld.fullname" . }}
5− labels:
6− {{- include "helloWorld.labels" . | nindent 4 }}
7−spec:
8− type: {{ .Values.service.type }}
9− ports:
10− - port: {{ .Values.service.port }}
11− targetPort: http
12− protocol: TCP
13− name: http
14− selector:
15− {{- include "helloWorld.selectorLabels" . | nindent 4 }}
contrib/helm/hello-world/templates/serviceaccount.yamldeleted−12
@@ -1,12 +0,0 @@
1−{{- if .Values.serviceAccount.create -}}
2−apiVersion: v1
3−kind: ServiceAccount
4−metadata:
5− name: {{ include "helloWorld.serviceAccountName" . }}
6− labels:
7− {{- include "helloWorld.labels" . | nindent 4 }}
8− {{- with .Values.serviceAccount.annotations }}
9− annotations:
10− {{- toYaml . | nindent 4 }}
11− {{- end }}
12−{{- end }}
contrib/helm/hello-world/values.yamldeleted−79
@@ -1,79 +0,0 @@
1−# Default values for helloWorld.
2−# This is a YAML-formatted file.
3−# Declare variables to be passed into your templates.
4−
5−replicaCount: 1
6−
7−image:
8− repository: tutum/hello-world
9− pullPolicy: IfNotPresent
10− # Overrides the image tag whose default is the chart version.
11− tag: latest
12−
13−imagePullSecrets: []
14−nameOverride: ""
15−fullnameOverride: ""
16−
17−serviceAccount:
18− # Specifies whether a service account should be created
19− create: true
20− # Annotations to add to the service account
21− annotations: {}
22− # The name of the service account to use.
23− # If not set and create is true, a name is generated using the fullname template
24− name: ""
25−
26−podAnnotations: {}
27−
28−podSecurityContext: {}
29− # fsGroup: 2000
30−
31−securityContext: {}
32− # capabilities:
33− # drop:
34− # - ALL
35− # readOnlyRootFilesystem: true
36− # runAsNonRoot: true
37− # runAsUser: 1000
38−
39−service:
40− type: ClusterIP
41− port: 80
42−
43−ingress:
44− enabled: false
45− annotations: {}
46− # kubernetes.io/ingress.class: nginx
47− # kubernetes.io/tls-acme: "true"
48− hosts:
49− - host: chart-example.local
50− paths: []
51− tls: []
52− # - secretName: chart-example-tls
53− # hosts:
54− # - chart-example.local
55−
56−resources: {}
57− # We usually recommend not to specify default resources and to leave this as a conscious
58− # choice for the user. This also increases chances charts run on environments with little
59− # resources, such as Minikube. If you do want to specify resources, uncomment the following
60− # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
61− # limits:
62− # cpu: 100m
63− # memory: 128Mi
64− # requests:
65− # cpu: 100m
66− # memory: 128Mi
67−
68−autoscaling:
69− enabled: false
70− minReplicas: 1
71− maxReplicas: 100
72− targetCPUUtilizationPercentage: 80
73− # targetMemoryUtilizationPercentage: 80
74−
75−nodeSelector: {}
76−
77−tolerations: []
78−
79−affinity: {}
contrib/helm/httpbin/Chart.yamldeleted−23
@@ -1,23 +0,0 @@
1−apiVersion: v2
2−name: httpbin
3−description: A Helm chart for Kubernetes
4−
5−# A chart can be either an 'application' or a 'library' chart.
6−#
7−# Application charts are a collection of templates that can be packaged into versioned archives
8−# to be deployed.
9−#
10−# Library charts provide useful utilities or functions for the chart developer. They're included as
11−# a dependency of application charts to inject those utilities and functions into the rendering
12−# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13−type: application
14−
15−# This is the chart version. This version number should be incremented each time you make changes
16−# to the chart and its templates, including the app version.
17−# Versions are expected to follow Semantic Versioning (https://semver.org/)
18−version: 0.6.1
19−
20−# This is the version number of the application being deployed. This version number should be
21−# incremented each time you make changes to the application. Versions are not expected to
22−# follow Semantic Versioning. They should reflect the version the application is using.
23−appVersion: 0.6.1
contrib/helm/httpbin/templates/_helpers.tpldeleted−63
@@ -1,63 +0,0 @@
1−{{/* vim: set filetype=mustache: */}}
2−{{/*
3−Expand the name of the chart.
4−*/}}
5−{{- define "httpbin.name" -}}
6−{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
7−{{- end }}
8−
9−{{/*
10−Create a default fully qualified app name.
11−We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12−If release name contains chart name it will be used as a full name.
13−*/}}
14−{{- define "httpbin.fullname" -}}
15−{{- if .Values.fullnameOverride }}
16−{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
17−{{- else }}
18−{{- $name := default .Chart.Name .Values.nameOverride }}
19−{{- if contains $name .Release.Name }}
20−{{- .Release.Name | trunc 63 | trimSuffix "-" }}
21−{{- else }}
22−{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
23−{{- end }}
24−{{- end }}
25−{{- end }}
26−
27−{{/*
28−Create chart name and version as used by the chart label.
29−*/}}
30−{{- define "httpbin.chart" -}}
31−{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32−{{- end }}
33−
34−{{/*
35−Common labels
36−*/}}
37−{{- define "httpbin.labels" -}}
38−helm.sh/chart: {{ include "httpbin.chart" . }}
39−{{ include "httpbin.selectorLabels" . }}
40−{{- if .Chart.AppVersion }}
41−app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
42−{{- end }}
43−app.kubernetes.io/managed-by: {{ .Release.Service }}
44−{{- end }}
45−
46−{{/*
47−Selector labels
48−*/}}
49−{{- define "httpbin.selectorLabels" -}}
50−app.kubernetes.io/name: {{ include "httpbin.name" . }}
51−app.kubernetes.io/instance: {{ .Release.Name }}
52−{{- end }}
53−
54−{{/*
55−Create the name of the service account to use
56−*/}}
57−{{- define "httpbin.serviceAccountName" -}}
58−{{- if .Values.serviceAccount.create }}
59−{{- default (include "httpbin.fullname" .) .Values.serviceAccount.name }}
60−{{- else }}
61−{{- default "default" .Values.serviceAccount.name }}
62−{{- end }}
63−{{- end }}
contrib/helm/httpbin/templates/deployment.yamldeleted−61
@@ -1,61 +0,0 @@
1−apiVersion: apps/v1
2−kind: Deployment
3−metadata:
4− name: {{ include "httpbin.fullname" . }}
5− labels:
6− {{- include "httpbin.labels" . | nindent 4 }}
7−spec:
8−{{- if not .Values.autoscaling.enabled }}
9− replicas: {{ .Values.replicaCount }}
10−{{- end }}
11− selector:
12− matchLabels:
13− {{- include "httpbin.selectorLabels" . | nindent 6 }}
14− template:
15− metadata:
16− {{- with .Values.podAnnotations }}
17− annotations:
18− {{- toYaml . | nindent 8 }}
19− {{- end }}
20− labels:
21− {{- include "httpbin.selectorLabels" . | nindent 8 }}
22− spec:
23− {{- with .Values.imagePullSecrets }}
24− imagePullSecrets:
25− {{- toYaml . | nindent 8 }}
26− {{- end }}
27− serviceAccountName: {{ include "httpbin.serviceAccountName" . }}
28− securityContext:
29− {{- toYaml .Values.podSecurityContext | nindent 8 }}
30− containers:
31− - name: {{ .Chart.Name }}
32− securityContext:
33− {{- toYaml .Values.securityContext | nindent 12 }}
34− image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
35− imagePullPolicy: {{ .Values.image.pullPolicy }}
36− ports:
37− - name: http
38− containerPort: 80
39− protocol: TCP
40− livenessProbe:
41− httpGet:
42− path: /
43− port: http
44− readinessProbe:
45− httpGet:
46− path: /
47− port: http
48− resources:
49− {{- toYaml .Values.resources | nindent 12 }}
50− {{- with .Values.nodeSelector }}
51− nodeSelector:
52− {{- toYaml . | nindent 8 }}
53− {{- end }}
54− {{- with .Values.affinity }}
55− affinity:
56− {{- toYaml . | nindent 8 }}
57− {{- end }}
58− {{- with .Values.tolerations }}
59− tolerations:
60− {{- toYaml . | nindent 8 }}
61− {{- end }}
contrib/helm/httpbin/templates/ingress.yamldeleted−41
@@ -1,41 +0,0 @@
1−{{- if .Values.ingress.enabled -}}
2−{{- $fullName := include "httpbin.fullname" . -}}
3−{{- $svcPort := .Values.service.port -}}
4−{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
5−apiVersion: networking.k8s.io/v1beta1
6−{{- else -}}
7−apiVersion: extensions/v1beta1
8−{{- end }}
9−kind: Ingress
10−metadata:
11− name: {{ $fullName }}
12− labels:
13− {{- include "httpbin.labels" . | nindent 4 }}
14− {{- with .Values.ingress.annotations }}
15− annotations:
16− {{- toYaml . | nindent 4 }}
17− {{- end }}
18−spec:
19− {{- if .Values.ingress.tls }}
20− tls:
21− {{- range .Values.ingress.tls }}
22− - hosts:
23− {{- range .hosts }}
24− - {{ . | quote }}
25− {{- end }}
26− secretName: {{ .secretName }}
27− {{- end }}
28− {{- end }}
29− rules:
30− {{- range .Values.ingress.hosts }}
31− - host: {{ .host | quote }}
32− http:
33− paths:
34− {{- range .paths }}
35− - path: {{ . }}
36− backend:
37− serviceName: {{ $fullName }}
38− servicePort: {{ $svcPort }}
39− {{- end }}
40− {{- end }}
41− {{- end }}
contrib/helm/httpbin/templates/service.yamldeleted−15
@@ -1,15 +0,0 @@
1−apiVersion: v1
2−kind: Service
3−metadata:
4− name: {{ include "httpbin.fullname" . }}
5− labels:
6− {{- include "httpbin.labels" . | nindent 4 }}
7−spec:
8− type: {{ .Values.service.type }}
9− ports:
10− - port: {{ .Values.service.port }}
11− targetPort: http
12− protocol: TCP
13− name: http
14− selector:
15− {{- include "httpbin.selectorLabels" . | nindent 4 }}
contrib/helm/httpbin/templates/serviceaccount.yamldeleted−12
@@ -1,12 +0,0 @@
1−{{- if .Values.serviceAccount.create -}}
2−apiVersion: v1
3−kind: ServiceAccount
4−metadata:
5− name: {{ include "httpbin.serviceAccountName" . }}
6− labels:
7− {{- include "httpbin.labels" . | nindent 4 }}
8− {{- with .Values.serviceAccount.annotations }}
9− annotations:
10− {{- toYaml . | nindent 4 }}
11− {{- end }}
12−{{- end }}
contrib/helm/httpbin/values.yamldeleted−79
@@ -1,79 +0,0 @@
1−# Default values for httpbin.
2−# This is a YAML-formatted file.
3−# Declare variables to be passed into your templates.
4−
5−replicaCount: 1
6−
7−image:
8− repository: kennethreitz/httpbin
9− pullPolicy: IfNotPresent
10− # Overrides the image tag whose default is the chart version.
11− tag: latest
12−
13−imagePullSecrets: []
14−nameOverride: ""
15−fullnameOverride: ""
16−
17−serviceAccount:
18− # Specifies whether a service account should be created
19− create: true
20− # Annotations to add to the service account
21− annotations: {}
22− # The name of the service account to use.
23− # If not set and create is true, a name is generated using the fullname template
24− name: ""
25−
26−podAnnotations: {}
27−
28−podSecurityContext: {}
29− # fsGroup: 2000
30−
31−securityContext: {}
32− # capabilities:
33− # drop:
34− # - ALL
35− # readOnlyRootFilesystem: true
36− # runAsNonRoot: true
37− # runAsUser: 1000
38−
39−service:
40− type: ClusterIP
41− port: 80
42−
43−ingress:
44− enabled: false
45− annotations: {}
46− # kubernetes.io/ingress.class: nginx
47− # kubernetes.io/tls-acme: "true"
48− hosts:
49− - host: chart-example.local
50− paths: []
51− tls: []
52− # - secretName: chart-example-tls
53− # hosts:
54− # - chart-example.local
55−
56−resources: {}
57− # We usually recommend not to specify default resources and to leave this as a conscious
58− # choice for the user. This also increases chances charts run on environments with little
59− # resources, such as Minikube. If you do want to specify resources, uncomment the following
60− # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
61− # limits:
62− # cpu: 100m
63− # memory: 128Mi
64− # requests:
65− # cpu: 100m
66− # memory: 128Mi
67−
68−autoscaling:
69− enabled: false
70− minReplicas: 1
71− maxReplicas: 100
72− targetCPUUtilizationPercentage: 80
73− # targetMemoryUtilizationPercentage: 80
74−
75−nodeSelector: {}
76−
77−tolerations: []
78−
79−affinity: {}
contrib/helm/.gitignore → contrib/kubernetes/.gitignorerenamed

The content is the same.

contrib/kubernetes/Chart.locknew file

No changes to the content.

contrib/helm/Chart.yaml → contrib/kubernetes/Chart.yamlrenamed+7−7
@@ -1,6 +1,6 @@
11apiVersion: v2
2−description: K8S example based on https://kind.sigs.k8s.io and https://helm.sh.
3−name: helm
2+description: K8S example based on https://kind.sigs.k8s.io
3+name: kubernetes
44version: 5.1.1
55appVersion: 5.1.1
66dependencies:
@@ -10,10 +10,10 @@ dependencies:
1010 - name: oauth2-proxy
1111 version: 3.1.0
1212 repository: https://kubernetes-charts.storage.googleapis.com
13− # https://github.com/postmanlabs/httpbin/issues/549 is still in progress, for now creating our own chart
13+ # https://github.com/postmanlabs/httpbin/issues/549 is still in progress, for now using a non-official chart
1414 - name: httpbin
15− version: 0.6.1
16− repository: file://./httpbin
15+ version: 1.0.0
16+ repository: https://conservis.github.io/helm-charts
1717 - name: hello-world
18− version: 0.0.1
19− repository: file://./hello-world
18+ version: 1.0.0
19+ repository: https://conservis.github.io/helm-charts
contrib/helm/Makefile → contrib/kubernetes/Makefilerenamed+36−14
@@ -1,3 +1,8 @@
1+all:
2+ @echo "Usage:"
3+ @echo " make create-cluster"
4+ @echo " make deploy"
5+
16# create kind cluster with nginx-ingress as the most popular ingress controller for K8S
27.PHONY: deploy
38create-cluster:
@@ -8,11 +13,9 @@ create-cluster:
813.PHONY: setup-ingress
914setup-ingress:
1015 kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
11− sleep 5 # because of https://github.com/kubernetes/kubernetes/issues/83242
12− kubectl --namespace ingress-nginx wait --for=condition=available --timeout=30s deployment/ingress-nginx-controller
13− kubectl --namespace ingress-nginx rollout status --timeout 90s deployment/ingress-nginx-controller
16+ kubectl --namespace ingress-nginx rollout status --timeout 5m deployment/ingress-nginx-controller
1417
15−# default Pod CIDR is 10.244.0.0/16 https://github.com/kubernetes-sigs/kind/blob/master/pkg/apis/config/v1alpha4/default.go
18+# default Pod CIDR is 10.244.0.0/16 https://github.com/kubernetes-sigs/kind/blob/a6e8108025bc7a9440beedb8ef7714aec84fe87e/pkg/apis/config/v1alpha4/default.go#L52
1619# what makes cluster host IP equal to 10.244.0.1
1720# thus we add dex.localtest.me and oauth2-proxy.localtest.me stub hosts pointing to this IP
1821# NOT NEEDED IN REAL LIFE!
@@ -20,25 +23,44 @@ setup-ingress:
2023setup-dns:
2124 kubectl apply -f custom-dns.yaml
2225 kubectl -n kube-system rollout restart deployment/coredns
23− kubectl -n kube-system rollout status --timeout 60s deployment/coredns
26+ kubectl -n kube-system rollout status --timeout 5m deployment/coredns
2427
25−.PHONY: undeploy
28+.PHONY: delete-cluster
2629delete-cluster:
2730 kind delete cluster --name oauth2-proxy
2831
29−.PHONY: helm-init
30−helm-init:
31− helm dep update
32−
33−.PHONY: undeploy
34−deploy: helm-init
35− helm upgrade --wait --debug --install --render-subchart-notes oauth2-proxy-example .
32+.PHONY: deploy
33+deploy:
34+ kubectl apply -f oauth2-proxy-example-full.yaml
35+ kubectl rollout status --timeout 5m deployment/oauth2-proxy-example-oauth2-proxy-sample
36+ kubectl rollout status --timeout 1m deployment/oauth2-proxy-example-httpbin
37+ kubectl rollout status --timeout 1m deployment/oauth2-proxy-example-hello-world
3638
3739.PHONY: undeploy
3840undeploy:
39− helm del oauth2-proxy-example
41+ kubectl delete -f oauth2-proxy-example-full.yaml
42+
43+######################
44+###### HELM CMDs #####
45+######################
46+.PHONY: helm-init
47+helm-init:
48+ helm dep update
4049
4150# unpacking is useful to be able to explore underlying helm charts
4251.PHONY: helm-unpack
4352helm-unpack:
4453 cd charts; for f in *.tgz; do tar -zxf "$$f"; done
54+
55+.PHONY: helm-deploy
56+helm-deploy: helm-init
57+ helm upgrade --wait --debug --install --render-subchart-notes oauth2-proxy-example .
58+
59+.PHONY: helm-undeploy
60+helm-undeploy:
61+ helm del oauth2-proxy-example
62+
63+# creates K8S manifest from helm chart
64+.PHONY: helm-create-manifest
65+helm-create-manifest:
66+ helm template --namespace default oauth2-proxy-example . > oauth2-proxy-example-full.yaml
contrib/helm/README.md → contrib/kubernetes/README.mdrenamed+6−5
@@ -1,6 +1,5 @@
11# Kubernetes example
2−Based on [kind](https://kind.sigs.k8s.io) as a local Kubernetes cluster and the package manager [helm](https://helm.sh).
3−
2+Based on [kind](https://kind.sigs.k8s.io) as a local Kubernetes cluster.
43
54## Quick start
65
@@ -8,16 +7,18 @@ Before you start:
87
98_Required_
109* install [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
11−* install [helm 3](https://helm.sh/docs/intro/quickstart/#install-helm).
1210* install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
1311
12+_Optional_
13+* install [helm 3](https://helm.sh/docs/intro/quickstart/#install-helm).
14+
1415Then:
1516
1617* `make create-cluster`
17−* `make deploy`
18+* `make deploy` OR `make helm-deploy` for helm
1819
1920Visit http://httpbin.localtest.me or http://hello-world.localtest.me/
2021
2122## Uninstall
2223
23−* `make delete-cluster`
24+* `make delete-cluster` OR `make helm-undeploy` for helm
contrib/helm/custom-dns.yaml → contrib/kubernetes/custom-dns.yamlrenamed

The content is the same.

contrib/helm/kind-cluster.yaml → contrib/kubernetes/kind-cluster.yamlrenamed+3
@@ -12,3 +12,6 @@ nodes:
1212 - containerPort: 80
1313 hostPort: 80
1414 protocol: TCP
15+ - containerPort: 443
16+ hostPort: 443
17+ protocol: TCP
contrib/kubernetes/oauth2-proxy-example-full.yamlnew file+605
@@ -0,0 +1,605 @@
1+---
2+# Source: kubernetes/charts/dex/templates/serviceaccount.yaml
3+apiVersion: v1
4+kind: ServiceAccount
5+metadata:
6+ labels:
7+ app.kubernetes.io/name: dex
8+ helm.sh/chart: dex-2.11.0
9+ app.kubernetes.io/instance: oauth2-proxy-example
10+ app.kubernetes.io/version: "2.23.0"
11+ app.kubernetes.io/managed-by: Helm
12+ name: oauth2-proxy-example-dex
13+---
14+# Source: kubernetes/charts/hello-world/templates/serviceaccount.yaml
15+apiVersion: v1
16+kind: ServiceAccount
17+metadata:
18+ name: oauth2-proxy-example-hello-world
19+ labels:
20+ helm.sh/chart: hello-world-1.0.0
21+ app.kubernetes.io/name: hello-world
22+ app.kubernetes.io/instance: oauth2-proxy-example
23+ app.kubernetes.io/version: "1.0.0"
24+ app.kubernetes.io/managed-by: Helm
25+---
26+# Source: kubernetes/charts/httpbin/templates/serviceaccount.yaml
27+apiVersion: v1
28+kind: ServiceAccount
29+metadata:
30+ name: oauth2-proxy-example-httpbin
31+ labels:
32+ helm.sh/chart: httpbin-1.0.0
33+ app.kubernetes.io/name: httpbin
34+ app.kubernetes.io/instance: oauth2-proxy-example
35+ app.kubernetes.io/version: "latest"
36+ app.kubernetes.io/managed-by: Helm
37+---
38+# Source: kubernetes/charts/oauth2-proxy/templates/serviceaccount.yaml
39+apiVersion: v1
40+kind: ServiceAccount
41+metadata:
42+ labels:
43+ app: oauth2-proxy-sample
44+ chart: oauth2-proxy-3.1.0
45+ release: oauth2-proxy-example
46+ heritage: Helm
47+ name: oauth2-proxy-example-oauth2-proxy-sample
48+---
49+# Source: kubernetes/charts/dex/templates/secret.yaml
50+apiVersion: v1
51+kind: Secret
52+metadata:
53+ labels:
54+ app.kubernetes.io/name: dex
55+ helm.sh/chart: dex-2.11.0
56+ app.kubernetes.io/instance: oauth2-proxy-example
57+ app.kubernetes.io/version: "2.23.0"
58+ app.kubernetes.io/managed-by: Helm
59+ name: oauth2-proxy-example-dex
60+stringData:
61+ config.yaml: |-
62+ issuer: http://dex.localtest.me
63+ storage:
64+ config:
65+ inCluster: true
66+ type: kubernetes
67+ logger:
68+ level: debug
69+ web:
70+ http: 0.0.0.0:5556
71+ oauth2:
72+ alwaysShowLoginScreen: false
73+ skipApprovalScreen: true
74+ staticClients:
75+ - id: oauth2-proxy
76+ name: OAuth2 Proxy
77+ redirectURIs:
78+ - http://oauth2-proxy.localtest.me/oauth2/callback
79+ secret: b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK
80+ enablePasswordDB: true
81+ staticPasswords:
82+ - email: admin@example.com
83+ hash: $2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W
84+ userID: 08a8684b-db88-4b73-90a9-3cd1661f5466
85+ username: admin
86+ expiry:
87+ idTokens: 1h
88+ signingKeys: 4h
89+---
90+# Source: kubernetes/charts/oauth2-proxy/templates/configmap.yaml
91+apiVersion: v1
92+kind: ConfigMap
93+metadata:
94+ labels:
95+ app: oauth2-proxy-sample
96+ chart: oauth2-proxy-3.1.0
97+ heritage: Helm
98+ release: oauth2-proxy-example
99+ name: oauth2-proxy-example-oauth2-proxy-sample
100+data:
101+ oauth2_proxy.cfg: "cookie_secret=\"OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w=\"\ncookie_domain=\".localtest.me\"\nwhitelist_domains=[\".localtest.me\"]\n# only users with this domain will be let in\nemail_domains=[\"example.com\"]\n\nclient_id=\"oauth2-proxy\"\nclient_secret=\"b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK\"\ncookie_secure=\"false\"\n\nredirect_url=\"http://oauth2-proxy.localtest.me/oauth2/callback\"\n\n# we don't want to proxy anything so pick a non-existent directory\nupstreams = [ \"file:///dev/null\" ]\n\n# return authenticated user to nginx\nset_xauthrequest = true\n# using http://dex.localtest.me/.well-known/openid-configuration oauth2-proxy will populate\n# login_url, redeem_url, and oidc_jwks_url\nprovider=\"oidc\"\noidc_issuer_url=\"http://dex.localtest.me\""
102+---
103+# Source: kubernetes/charts/dex/templates/clusterrole.yaml
104+apiVersion: rbac.authorization.k8s.io/v1
105+kind: ClusterRole
106+metadata:
107+ labels:
108+ app.kubernetes.io/name: dex
109+ helm.sh/chart: dex-2.11.0
110+ app.kubernetes.io/instance: oauth2-proxy-example
111+ app.kubernetes.io/version: "2.23.0"
112+ app.kubernetes.io/managed-by: Helm
113+ name: oauth2-proxy-example-dex
114+rules:
115+- apiGroups: ["dex.coreos.com"] # API group created by dex
116+ resources: ["*"]
117+ verbs: ["*"]
118+- apiGroups: ["apiextensions.k8s.io"]
119+ resources: ["customresourcedefinitions"]
120+ verbs: ["create"] # To manage its own resources, dex must be able to create customresourcedefinitions
121+---
122+# Source: kubernetes/charts/dex/templates/clusterrolebinding.yaml
123+apiVersion: rbac.authorization.k8s.io/v1
124+kind: ClusterRoleBinding
125+metadata:
126+ labels:
127+ app.kubernetes.io/name: dex
128+ helm.sh/chart: dex-2.11.0
129+ app.kubernetes.io/instance: oauth2-proxy-example
130+ app.kubernetes.io/version: "2.23.0"
131+ app.kubernetes.io/managed-by: Helm
132+ name: oauth2-proxy-example-dex
133+roleRef:
134+ apiGroup: rbac.authorization.k8s.io
135+ kind: ClusterRole
136+ name: oauth2-proxy-example-dex
137+subjects:
138+ - kind: ServiceAccount
139+ name: oauth2-proxy-example-dex
140+ namespace: default
141+---
142+# Source: kubernetes/charts/dex/templates/service.yaml
143+apiVersion: v1
144+kind: Service
145+metadata:
146+ name: oauth2-proxy-example-dex
147+ labels:
148+ app.kubernetes.io/name: dex
149+ helm.sh/chart: dex-2.11.0
150+ app.kubernetes.io/instance: oauth2-proxy-example
151+ app.kubernetes.io/version: "2.23.0"
152+ app.kubernetes.io/managed-by: Helm
153+spec:
154+ type: ClusterIP
155+ sessionAffinity: None
156+ ports:
157+ - name: http
158+ targetPort: http
159+ port: 32000
160+ selector:
161+ app.kubernetes.io/name: dex
162+ app.kubernetes.io/instance: oauth2-proxy-example
163+---
164+# Source: kubernetes/charts/hello-world/templates/service.yaml
165+apiVersion: v1
166+kind: Service
167+metadata:
168+ name: oauth2-proxy-example-hello-world
169+ labels:
170+ helm.sh/chart: hello-world-1.0.0
171+ app.kubernetes.io/name: hello-world
172+ app.kubernetes.io/instance: oauth2-proxy-example
173+ app.kubernetes.io/version: "1.0.0"
174+ app.kubernetes.io/managed-by: Helm
175+spec:
176+ type: ClusterIP
177+ ports:
178+ - port: 9080
179+ targetPort: http
180+ protocol: TCP
181+ name: http
182+ selector:
183+ app.kubernetes.io/name: hello-world
184+ app.kubernetes.io/instance: oauth2-proxy-example
185+---
186+# Source: kubernetes/charts/httpbin/templates/service.yaml
187+apiVersion: v1
188+kind: Service
189+metadata:
190+ name: oauth2-proxy-example-httpbin
191+ labels:
192+ helm.sh/chart: httpbin-1.0.0
193+ app.kubernetes.io/name: httpbin
194+ app.kubernetes.io/instance: oauth2-proxy-example
195+ app.kubernetes.io/version: "latest"
196+ app.kubernetes.io/managed-by: Helm
197+spec:
198+ type: ClusterIP
199+ ports:
200+ - port: 80
201+ targetPort: http
202+ protocol: TCP
203+ name: http
204+ selector:
205+ app.kubernetes.io/name: httpbin
206+ app.kubernetes.io/instance: oauth2-proxy-example
207+---
208+# Source: kubernetes/charts/oauth2-proxy/templates/service.yaml
209+apiVersion: v1
210+kind: Service
211+metadata:
212+ labels:
213+ app: oauth2-proxy-sample
214+ chart: oauth2-proxy-3.1.0
215+ release: oauth2-proxy-example
216+ heritage: Helm
217+ name: oauth2-proxy-example-oauth2-proxy-sample
218+spec:
219+ type: ClusterIP
220+ ports:
221+ - port: 80
222+ targetPort: http
223+ protocol: TCP
224+ name: http
225+ selector:
226+ app: oauth2-proxy-sample
227+ release: oauth2-proxy-example
228+---
229+# Source: kubernetes/charts/dex/templates/deployment.yaml
230+apiVersion: apps/v1
231+kind: Deployment
232+metadata:
233+ name: oauth2-proxy-example-dex
234+ labels:
235+ app.kubernetes.io/name: dex
236+ helm.sh/chart: dex-2.11.0
237+ app.kubernetes.io/instance: oauth2-proxy-example
238+ app.kubernetes.io/version: "2.23.0"
239+ app.kubernetes.io/managed-by: Helm
240+ app.kubernetes.io/component: dex
241+spec:
242+ replicas: 1
243+ strategy:
244+ rollingUpdate:
245+ maxSurge: 0
246+ maxUnavailable: 1
247+ type: RollingUpdate
248+ selector:
249+ matchLabels:
250+ app.kubernetes.io/name: dex
251+ app.kubernetes.io/instance: oauth2-proxy-example
252+ app.kubernetes.io/component: dex
253+ template:
254+ metadata:
255+ labels:
256+ app.kubernetes.io/name: dex
257+ app.kubernetes.io/instance: oauth2-proxy-example
258+ app.kubernetes.io/component: dex
259+ annotations:
260+ checksum/config: 185f32cfabdf4f7467868dc301d4bd33e68951e12eddeb69f23ebc1d0f91ba28
261+ spec:
262+ serviceAccountName: oauth2-proxy-example-dex
263+ nodeSelector:
264+ {}
265+ containers:
266+ - name: main
267+ image: "quay.io/dexidp/dex:v2.23.0"
268+ imagePullPolicy: IfNotPresent
269+ command:
270+ - /usr/local/bin/dex
271+ - serve
272+ - /etc/dex/cfg/config.yaml
273+ resources:
274+ null
275+ ports:
276+ - name: http
277+ containerPort: 5556
278+ protocol: TCP
279+ livenessProbe:
280+ httpGet:
281+ path: /healthz
282+ port: http
283+ initialDelaySeconds: 1
284+ periodSeconds: 10
285+ timeoutSeconds: 1
286+ failureThreshold: 1
287+ readinessProbe:
288+ httpGet:
289+ path: /healthz
290+ port: http
291+ initialDelaySeconds: 1
292+ periodSeconds: 10
293+ timeoutSeconds: 1
294+ failureThreshold: 1
295+ env:
296+ []
297+ volumeMounts:
298+ - mountPath: /etc/dex/cfg
299+ name: config
300+ volumes:
301+ - secret:
302+ defaultMode: 420
303+ items:
304+ - key: config.yaml
305+ path: config.yaml
306+ secretName: oauth2-proxy-example-dex
307+ name: config
308+---
309+# Source: kubernetes/charts/hello-world/templates/deployment.yaml
310+apiVersion: apps/v1
311+kind: Deployment
312+metadata:
313+ name: oauth2-proxy-example-hello-world
314+ labels:
315+ helm.sh/chart: hello-world-1.0.0
316+ app.kubernetes.io/name: hello-world
317+ app.kubernetes.io/instance: oauth2-proxy-example
318+ app.kubernetes.io/version: "1.0.0"
319+ app.kubernetes.io/managed-by: Helm
320+spec:
321+ replicas: 1
322+ selector:
323+ matchLabels:
324+ app.kubernetes.io/name: hello-world
325+ app.kubernetes.io/instance: oauth2-proxy-example
326+ template:
327+ metadata:
328+ labels:
329+ app.kubernetes.io/name: hello-world
330+ app.kubernetes.io/instance: oauth2-proxy-example
331+ spec:
332+ serviceAccountName: oauth2-proxy-example-hello-world
333+ securityContext:
334+ {}
335+ containers:
336+ - name: hello-world
337+ securityContext:
338+ {}
339+ image: "conservis/hello-world:1.0.0"
340+ imagePullPolicy: IfNotPresent
341+ ports:
342+ - name: http
343+ containerPort: 9080
344+ protocol: TCP
345+ livenessProbe:
346+ httpGet:
347+ path: /
348+ port: http
349+ readinessProbe:
350+ httpGet:
351+ path: /
352+ port: http
353+ resources:
354+ {}
355+---
356+# Source: kubernetes/charts/httpbin/templates/deployment.yaml
357+apiVersion: apps/v1
358+kind: Deployment
359+metadata:
360+ name: oauth2-proxy-example-httpbin
361+ labels:
362+ helm.sh/chart: httpbin-1.0.0
363+ app.kubernetes.io/name: httpbin
364+ app.kubernetes.io/instance: oauth2-proxy-example
365+ app.kubernetes.io/version: "latest"
366+ app.kubernetes.io/managed-by: Helm
367+spec:
368+ replicas: 1
369+ selector:
370+ matchLabels:
371+ app.kubernetes.io/name: httpbin
372+ app.kubernetes.io/instance: oauth2-proxy-example
373+ template:
374+ metadata:
375+ labels:
376+ app.kubernetes.io/name: httpbin
377+ app.kubernetes.io/instance: oauth2-proxy-example
378+ spec:
379+ serviceAccountName: oauth2-proxy-example-httpbin
380+ securityContext:
381+ {}
382+ containers:
383+ - name: httpbin
384+ securityContext:
385+ {}
386+ image: "kennethreitz/httpbin:latest"
387+ imagePullPolicy: IfNotPresent
388+ ports:
389+ - name: http
390+ containerPort: 80
391+ protocol: TCP
392+ livenessProbe:
393+ httpGet:
394+ path: /
395+ port: http
396+ readinessProbe:
397+ httpGet:
398+ path: /
399+ port: http
400+ resources:
401+ {}
402+---
403+# Source: kubernetes/charts/oauth2-proxy/templates/deployment.yaml
404+apiVersion: apps/v1
405+kind: Deployment
406+metadata:
407+ labels:
408+ app: oauth2-proxy-sample
409+ chart: oauth2-proxy-3.1.0
410+ heritage: Helm
411+ release: oauth2-proxy-example
412+ name: oauth2-proxy-example-oauth2-proxy-sample
413+spec:
414+ replicas: 1
415+ selector:
416+ matchLabels:
417+ app: oauth2-proxy-sample
418+ release: oauth2-proxy-example
419+ template:
420+ metadata:
421+ annotations:
422+ checksum/config: 5d8892a7b1d9eb03f9d59b787ce339b374fa2be51991e4e7533cb0a541984fac
423+ checksum/config-emails: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
424+ checksum/secret: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
425+ checksum/google-secret: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
426+ labels:
427+ app: oauth2-proxy-sample
428+ release: "oauth2-proxy-example"
429+ spec:
430+ serviceAccountName: oauth2-proxy-example-oauth2-proxy-sample
431+ containers:
432+ - name: oauth2-proxy
433+ image: "quay.io/pusher/oauth2_proxy:v5.1.0"
434+ imagePullPolicy: IfNotPresent
435+ args:
436+ - --http-address=0.0.0.0:4180
437+ - --config=/etc/oauth2_proxy/oauth2_proxy.cfg
438+ ports:
439+ - containerPort: 4180
440+ name: http
441+ protocol: TCP
442+ livenessProbe:
443+ httpGet:
444+ path: /ping
445+ port: http
446+ scheme: HTTP
447+ initialDelaySeconds: 0
448+ timeoutSeconds: 1
449+ readinessProbe:
450+ httpGet:
451+ path: /ping
452+ port: http
453+ scheme: HTTP
454+ initialDelaySeconds: 0
455+ timeoutSeconds: 1
456+ successThreshold: 1
457+ periodSeconds: 10
458+ resources:
459+ {}
460+ volumeMounts:
461+ - mountPath: /etc/oauth2_proxy
462+ name: configmain
463+ volumes:
464+ - configMap:
465+ defaultMode: 420
466+ name: oauth2-proxy-example-oauth2-proxy-sample
467+ name: configmain
468+ tolerations:
469+ []
470+---
471+# Source: kubernetes/charts/dex/templates/ingress.yaml
472+apiVersion: extensions/v1beta1
473+kind: Ingress
474+metadata:
475+ name: oauth2-proxy-example-dex
476+ labels:
477+ app.kubernetes.io/name: dex
478+ helm.sh/chart: dex-2.11.0
479+ app.kubernetes.io/instance: oauth2-proxy-example
480+ app.kubernetes.io/version: "2.23.0"
481+ app.kubernetes.io/managed-by: Helm
482+spec:
483+ rules:
484+ - host: "dex.localtest.me"
485+ http:
486+ paths:
487+ - path: /
488+ backend:
489+ serviceName: oauth2-proxy-example-dex
490+ servicePort: 32000
491+---
492+# Source: kubernetes/charts/hello-world/templates/ingress.yaml
493+apiVersion: networking.k8s.io/v1beta1
494+kind: Ingress
495+metadata:
496+ name: oauth2-proxy-example-hello-world
497+ labels:
498+ helm.sh/chart: hello-world-1.0.0
499+ app.kubernetes.io/name: hello-world
500+ app.kubernetes.io/instance: oauth2-proxy-example
501+ app.kubernetes.io/version: "1.0.0"
502+ app.kubernetes.io/managed-by: Helm
503+ annotations:
504+ nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User,X-Auth-Request-Email
505+ nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
506+ nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy-example-oauth2-proxy-sample.default.svc.cluster.local/oauth2/auth
507+spec:
508+ rules:
509+ - host: hello-world.localtest.me
510+ http:
511+ paths:
512+ - path: /
513+ backend:
514+ serviceName: oauth2-proxy-example-hello-world
515+ servicePort: 9080
516+---
517+# Source: kubernetes/charts/httpbin/templates/ingress.yaml
518+apiVersion: networking.k8s.io/v1beta1
519+kind: Ingress
520+metadata:
521+ name: oauth2-proxy-example-httpbin
522+ labels:
523+ helm.sh/chart: httpbin-1.0.0
524+ app.kubernetes.io/name: httpbin
525+ app.kubernetes.io/instance: oauth2-proxy-example
526+ app.kubernetes.io/version: "latest"
527+ app.kubernetes.io/managed-by: Helm
528+ annotations:
529+ nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User,X-Auth-Request-Email
530+ nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
531+ nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy-example-oauth2-proxy-sample.default.svc.cluster.local/oauth2/auth
532+spec:
533+ rules:
534+ - host: httpbin.localtest.me
535+ http:
536+ paths:
537+ - path: /
538+ backend:
539+ serviceName: oauth2-proxy-example-httpbin
540+ servicePort: 80
541+---
542+# Source: kubernetes/charts/oauth2-proxy/templates/ingress.yaml
543+apiVersion: extensions/v1beta1
544+kind: Ingress
545+metadata:
546+ labels:
547+ app: oauth2-proxy-sample
548+ chart: oauth2-proxy-3.1.0
549+ heritage: Helm
550+ release: oauth2-proxy-example
551+ name: oauth2-proxy-example-oauth2-proxy-sample
552+ annotations:
553+ nginx.ingress.kubernetes.io/server-snippet: |
554+ large_client_header_buffers 4 32k;
555+spec:
556+ rules:
557+ - host: oauth2-proxy.localtest.me
558+ http:
559+ paths:
560+ - path: /
561+ backend:
562+ serviceName: oauth2-proxy-example-oauth2-proxy-sample
563+ servicePort: 80
564+---
565+# Source: kubernetes/charts/hello-world/templates/tests/test-connection.yaml
566+apiVersion: v1
567+kind: Pod
568+metadata:
569+ name: "oauth2-proxy-example-hello-world-test-connection"
570+ labels:
571+ helm.sh/chart: hello-world-1.0.0
572+ app.kubernetes.io/name: hello-world
573+ app.kubernetes.io/instance: oauth2-proxy-example
574+ app.kubernetes.io/version: "1.0.0"
575+ app.kubernetes.io/managed-by: Helm
576+ annotations:
577+ "helm.sh/hook": test-success
578+spec:
579+ containers:
580+ - name: wget
581+ image: busybox
582+ command: ['wget']
583+ args: ['oauth2-proxy-example-hello-world:9080']
584+ restartPolicy: Never
585+---
586+# Source: kubernetes/charts/httpbin/templates/tests/test-connection.yaml
587+apiVersion: v1
588+kind: Pod
589+metadata:
590+ name: "oauth2-proxy-example-httpbin-test-connection"
591+ labels:
592+ helm.sh/chart: httpbin-1.0.0
593+ app.kubernetes.io/name: httpbin
594+ app.kubernetes.io/instance: oauth2-proxy-example
595+ app.kubernetes.io/version: "latest"
596+ app.kubernetes.io/managed-by: Helm
597+ annotations:
598+ "helm.sh/hook": test-success
599+spec:
600+ containers:
601+ - name: wget
602+ image: busybox
603+ command: ['wget']
604+ args: ['oauth2-proxy-example-httpbin:80']
605+ restartPolicy: Never
contrib/helm/values.yaml → contrib/kubernetes/values.yamlrenamed+2−6
@@ -68,9 +68,7 @@ httpbin:
6868 ingress:
6969 enabled: true
7070 hosts:
71− - host: httpbin.localtest.me
72− paths:
73− - /
71+ - httpbin.localtest.me
7472 annotations:
7573 nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
7674 # That's what will be used in REAL LIFE
@@ -83,9 +81,7 @@ hello-world:
8381 ingress:
8482 enabled: true
8583 hosts:
86− - host: hello-world.localtest.me
87− paths:
88− - /
84+ - hello-world.localtest.me
8985 annotations:
9086 nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
9187 # That's what will be used in REAL LIFE