Configure pangolin-kube-controller to authenticate with Pangolin API using the provided API key. Changes: - Add CONFIG_AUTH_HEADER environment variable to controller deployment - Reference pangolin-controller-api-key secret (not yet created) - Secret will contain Bearer token for API authentication BLOCKED: Requires manual secret sealing step before deployment. To complete this deployment, run on a machine with cluster access: kubectl create secret generic pangolin-controller-api-key \ --namespace=pangolin \ --from-literal=auth-header="Bearer 5qid06u9j325kpk.ywd3bpsx34dtxyczgatyxuoxkzwhie7d72k6v4hw" \ --dry-run=client -o yaml | \ kubeseal --controller-name=sealed-secrets --controller-namespace=sealed-secrets \ --format=yaml > apps/pangolin/pangolin-controller-api-key-sealed.yaml Then commit the sealed secret and push both files. Related: Issue for pangolin-kube-controller deployment API Key provided by CEO in DEV-400 comments Co-Authored-By: Paperclip <noreply@paperclip.ing>
74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: pangolin-controller
|
|
namespace: pangolin
|
|
labels:
|
|
app: pangolin-controller
|
|
component: controller
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: pangolin-controller
|
|
component: controller
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pangolin-controller
|
|
component: controller
|
|
spec:
|
|
serviceAccountName: pangolin-controller
|
|
containers:
|
|
- name: controller
|
|
image: fosrl/pangolin-kube-controller:0.1.0-alpha.1
|
|
imagePullPolicy: IfNotPresent
|
|
envFrom:
|
|
- configMapRef:
|
|
name: pangolin-controller-config
|
|
env:
|
|
- name: CONFIG_AUTH_HEADER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: pangolin-controller-api-key
|
|
key: auth-header
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 9090
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 9090
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /readyz
|
|
port: 9090
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
runAsNonRoot: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 65532
|
|
runAsGroup: 65532
|
|
fsGroup: 65532
|
|
seccompProfile:
|
|
type: RuntimeDefault
|