infrastructure/pomerium/templates/serviceaccount.yaml
Infrastructure Admin d770504fa5 Initial infrastructure as code deployment
This commit includes the complete Kubernetes infrastructure deployment for NGE6:

- Crossplane setup with providers (Kubernetes, Helm, Civo)
- Ambassador/Emissary ingress controller with SSL termination
- Cert-manager with Let's Encrypt and Gandi webhook for DNS01 challenges
- ExternalDNS integration with Gandi for automatic DNS management
- Keycloak authentication server with PostgreSQL
- Pomerium identity-aware proxy with OIDC integration
- Forgejo Git server with persistent storage and authentication
- Spire/SPIFFE for secure service communication

All services are deployed using Infrastructure as Code principles with
Crossplane managing Kubernetes and Helm resources declaratively.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 08:43:06 -04:00

115 lines
3.8 KiB
YAML

apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "pomerium.authenticate.serviceAccountName" . }}
labels:
app.kubernetes.io/name: {{ template "pomerium.authenticate.serviceAccountName" . }}
helm.sh/chart: {{ template "pomerium.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: authenticate
annotations:
{{- if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.authenticate.serviceAccount.annotations }}
{{- range $key, $value := .Values.authenticate.serviceAccount.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "pomerium.authorize.serviceAccountName" . }}
labels:
app.kubernetes.io/name: {{ template "pomerium.authorize.serviceAccountName" . }}
helm.sh/chart: {{ template "pomerium.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: authorize
annotations:
{{- if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.authorize.serviceAccount.annotations }}
{{- range $key, $value := .Values.authorize.serviceAccount.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "pomerium.databroker.serviceAccountName" . }}
labels:
app.kubernetes.io/name: {{ template "pomerium.databroker.serviceAccountName" . }}
helm.sh/chart: {{ template "pomerium.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: databroker
annotations:
{{- if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.databroker.serviceAccount.annotations }}
{{- range $key, $value := .Values.databroker.serviceAccount.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "pomerium.proxy.serviceAccountName" . }}
labels:
app.kubernetes.io/name: {{ template "pomerium.proxy.serviceAccountName" . }}
helm.sh/chart: {{ template "pomerium.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: proxy
annotations:
{{- if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.proxy.serviceAccount.annotations }}
{{- range $key, $value := .Values.proxy.serviceAccount.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{ if .Values.ingressController.enabled -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "pomerium.ingressController.serviceAccountName" . }}
labels:
app.kubernetes.io/name: {{ template "pomerium.ingressController.name" . }}
helm.sh/chart: {{ template "pomerium.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: ingressController
annotations:
{{- if .Values.ingressController.serviceAccount.annotations }}
{{- range $key, $value := .Values.ingressController.serviceAccount.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end -}}