-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add kurl proxy resources to AdminConsole helm chart (#32)
* feat: Add kurl proxy service to allow TLS setup * Add admin-console labels to kurl resources * Only deploy admin console service if kURL proxy is absent * Remove duplicate labels * Delete helm chart before building and correct template error
- Loading branch information
Showing
9 changed files
with
133 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ scripts/ | |
/*.yaml.tmpl | ||
/.image.env | ||
/.git | ||
/.github | ||
/.github | ||
/.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{{ if .Values.kurlProxy.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kurl-proxy-kotsadm | ||
labels: | ||
app: kurl-proxy-kotsadm | ||
{{- include "admin-console.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: kurl-proxy-kotsadm | ||
template: | ||
metadata: | ||
labels: | ||
app: kurl-proxy-kotsadm | ||
{{- include "admin-console.labels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: proxy | ||
image: {{ .Values.images.kurlProxy }} | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: NODE_PORT | ||
value: "{{ .Values.kurlProxy.targetPort }}" | ||
- name: UPSTREAM_ORIGIN | ||
value: http://kotsadm:3000 | ||
- name: TLS_SECRET_NAME | ||
value: kotsadm-tls | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
volumeMounts: | ||
- name: kotsadm-config | ||
mountPath: /etc/kotsadm | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 200Mi | ||
requests: | ||
cpu: 50m | ||
memory: 50Mi | ||
serviceAccount: kurl-proxy | ||
volumes: | ||
- name: kotsadm-config | ||
configMap: | ||
name: kotsadm-application-metadata | ||
optional: true | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{{ if .Values.kurlProxy.enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kurl-proxy | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "admin-console.labels" . | nindent 4 }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: secret-manager | ||
labels: | ||
{{- include "admin-console.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "watch", "list", "create", "patch", "update"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: kurl-proxy-tls-secrets | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "admin-console.labels" . | nindent 4 }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: secret-manager | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kurl-proxy | ||
namespace: {{ .Release.Namespace }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{ if .Values.kurlProxy.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kurl-proxy-kotsadm | ||
labels: | ||
{{- include "admin-console.labels" . | nindent 4 }} | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: kurl-proxy-kotsadm | ||
ports: | ||
- port: {{ .Values.kurlProxy.targetPort }} | ||
targetPort: {{ .Values.kurlProxy.targetPort }} | ||
{{- if .Values.kurlProxy.nodePort }} | ||
nodePort: {{ .Values.kurlProxy.nodePort }} | ||
{{- end}} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters