135 lines
4.9 KiB
YAML
135 lines
4.9 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
labels:
|
|
control-plane: controller-manager
|
|
app.kubernetes.io/name: src
|
|
app.kubernetes.io/managed-by: kustomize
|
|
name: system
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
labels:
|
|
control-plane: controller-manager
|
|
app.kubernetes.io/name: gitops-diff-operator
|
|
app.kubernetes.io/managed-by: kustomize
|
|
name: ssh-key
|
|
namespace: system
|
|
stringData:
|
|
known_hosts: |
|
|
git.badhouseplants.net ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDTsGvo2KESuvWLf4QEwg+1DdetksEgowGAW04OezLhpA6bqT/6WIx0O6NaQCSN+ZxBRV2a/+ICSGFtU+RFTtbcu30Lcsl/yD9qwbzBqNTUweaWPNze5LrHbIV0/J8nTSt4vzCw3eF0wdvnIQWLhdjQ4qjtV1OWlYJDwo1rHPDJ5JAuYKeLz50iEhs7R6oj2ccws2olGUssG4voi/EHWVxQa3khmSNWdHTNR6H6sdkehKWflGokS5oRf5dIUFj+BbFbq6JxJQXzoiVzOoLdfGz1S6m5i1O0UbDgnoL/my+0ZiswbIa5ApbP+oOjvW5NWF1lzehowNj7Kd1Ow9+FN+2eHSPN+g5rXapBNclQ5/JT5pcSP3vjVuvNoUE/GHhLLFLG3nsPd0GuSB9PDWqxBdnAybOjjldL2cTdDajcdkYbyUGT5HCvdjgpCeJe22JQElvTgKWnICDsnCaIXPwrp1ek5soAjY6ylsOv2KYUnoo+gy7P0+Bzf9JzngfgcN/4x5s8keRQ6YNC9I3NiN1XRdJA52/RGMQfuWjqcqG04yk6AHZZLD3OdBJRjLhXSRn4/DixQ6BxT25mZfZVuyS9pOuDXaI9ZmYtX+xSXAp1XTfIH6t/ud1A+jTKbrCeV5AS6CmlGVfge+9ewDw7RRGd3MW5i5N3N7RwJVMfpcTXVPY2sQ==
|
|
ssh-key: |
|
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
|
QyNTUxOQAAACD1yCmImxo9MBmRDKGYZAg1zLF2JZR1yWFem2s7+oR7lwAAAJid8CAjnfAg
|
|
IwAAAAtzc2gtZWQyNTUxOQAAACD1yCmImxo9MBmRDKGYZAg1zLF2JZR1yWFem2s7+oR7lw
|
|
AAAEAx9GITnEAhwE8td+EqwgU7Qnf29DWIsiS1Z2ACfIqZs/XIKYibGj0wGZEMoZhkCDXM
|
|
sXYllHXJYV6bazv6hHuXAAAAEGFsbGFuZ2VyQE1ha0Jvb2sBAgMEBQ==
|
|
-----END OPENSSH PRIVATE KEY-----
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: controller-manager
|
|
namespace: system
|
|
labels:
|
|
control-plane: controller-manager
|
|
app.kubernetes.io/name: src
|
|
app.kubernetes.io/managed-by: kustomize
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
control-plane: controller-manager
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kubectl.kubernetes.io/default-container: manager
|
|
labels:
|
|
control-plane: controller-manager
|
|
spec:
|
|
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
|
|
# according to the platforms which are supported by your solution.
|
|
# It is considered best practice to support multiple architectures. You can
|
|
# build your manager image using the makefile target docker-buildx.
|
|
# affinity:
|
|
# nodeAffinity:
|
|
# requiredDuringSchedulingIgnoredDuringExecution:
|
|
# nodeSelectorTerms:
|
|
# - matchExpressions:
|
|
# - key: kubernetes.io/arch
|
|
# operator: In
|
|
# values:
|
|
# - amd64
|
|
# - arm64
|
|
# - ppc64le
|
|
# - s390x
|
|
# - key: kubernetes.io/os
|
|
# operator: In
|
|
# values:
|
|
# - linux
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
# TODO(user): For common cases that do not require escalating privileges
|
|
# it is recommended to ensure that all your Pods/Containers are restrictive.
|
|
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
|
|
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
|
|
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
|
|
# seccompProfile:
|
|
# type: RuntimeDefault
|
|
volumes:
|
|
- name: ssh-key
|
|
secret:
|
|
secretName: ssh-key
|
|
containers:
|
|
- command:
|
|
- /manager
|
|
args:
|
|
- --leader-elect
|
|
- --health-probe-bind-address=:8081
|
|
image: controller:latest
|
|
name: manager
|
|
env:
|
|
- name: SSH_KNOWN_HOSTS
|
|
value: /var/known_hosts
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- "ALL"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8081
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /readyz
|
|
port: 8081
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
# TODO(user): Configure the resources accordingly based on the project requirements.
|
|
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 128Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 64Mi
|
|
volumeMounts:
|
|
- mountPath: /var/ssh-key
|
|
name: ssh-key
|
|
subPath: ssh-key
|
|
readOnly: true
|
|
- mountPath: /var/known_hosts
|
|
name: ssh-key
|
|
subPath: known_hosts
|
|
readOnly: true
|
|
|
|
serviceAccountName: controller-manager
|
|
terminationGracePeriodSeconds: 10
|