mitigate noexecute taint to allow ingress pods, add manifest for pgcluster.
This commit is contained in:
parent
f531ee5ee8
commit
3f5c9bb26b
2 changed files with 122 additions and 0 deletions
14
k8s/cnpg-cluster.yaml
Normal file
14
k8s/cnpg-cluster.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: cluster-rut-test
|
||||
namespace: sunet-cnpg
|
||||
spec:
|
||||
instances: 3
|
||||
storage:
|
||||
size: 10Gi
|
||||
affinity:
|
||||
enablePodAntiAffinity: true
|
||||
topologyKey: failure-domain.beta.kubernetes.io/zone
|
||||
nodeSelector:
|
||||
sunet.se/role: cnpg
|
108
k8s/ingress.yaml
Normal file
108
k8s/ingress.yaml
Normal file
|
@ -0,0 +1,108 @@
|
|||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
annotations:
|
||||
labels:
|
||||
node.kubernetes.io/microk8s-controlplane: microk8s-controlplane
|
||||
name: nginx-ingress-microk8s-controller
|
||||
namespace: ingress
|
||||
resourceVersion: "57362743"
|
||||
uid: 6c9d633a-ea77-4120-9d63-71b12905fc52
|
||||
spec:
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
name: nginx-ingress-microk8s
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
name: nginx-ingress-microk8s
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- /nginx-ingress-controller
|
||||
- --configmap=$(POD_NAMESPACE)/nginx-load-balancer-microk8s-conf
|
||||
- --tcp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-tcp-microk8s-conf
|
||||
- --udp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-udp-microk8s-conf
|
||||
- --ingress-class=public
|
||||
- ' '
|
||||
- --publish-status-address=127.0.0.1
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
image: registry.k8s.io/ingress-nginx/controller:v1.8.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- /wait-shutdown
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10254
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
name: nginx-ingress-microk8s
|
||||
ports:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 10254
|
||||
hostPort: 10254
|
||||
name: health
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10254
|
||||
scheme: HTTP
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
resources: {}
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_BIND_SERVICE
|
||||
drop:
|
||||
- ALL
|
||||
runAsUser: 101
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
securityContext: {}
|
||||
serviceAccount: nginx-ingress-microk8s-serviceaccount
|
||||
serviceAccountName: nginx-ingress-microk8s-serviceaccount
|
||||
terminationGracePeriodSeconds: 60
|
||||
tolerations:
|
||||
- effect: NoExecute
|
||||
key: cp-node
|
||||
operator: Equal
|
||||
value: "true"
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 0
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
Loading…
Add table
Reference in a new issue