From c85db7f2cbf01d347f64626726e3da83fc53ebc2 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 8 Jul 2022 00:55:43 +0200 Subject: move old ingress controller to graveyard --- contrib/k8s-emc/_graveyard_/ingress-cm.yml | 8 ++ .../_graveyard_/ingress-default-backend.yml | 59 +++++++++ contrib/k8s-emc/_graveyard_/ingress-ds.yml | 70 +++++++++++ contrib/k8s-emc/_graveyard_/ingress-rbac.yml | 133 +++++++++++++++++++++ contrib/k8s-emc/_graveyard_/ingress-tcp-cm.yml | 8 ++ contrib/k8s-emc/_graveyard_/ingress-udp-cm.yml | 8 ++ 6 files changed, 286 insertions(+) create mode 100644 contrib/k8s-emc/_graveyard_/ingress-cm.yml create mode 100644 contrib/k8s-emc/_graveyard_/ingress-default-backend.yml create mode 100644 contrib/k8s-emc/_graveyard_/ingress-ds.yml create mode 100644 contrib/k8s-emc/_graveyard_/ingress-rbac.yml create mode 100644 contrib/k8s-emc/_graveyard_/ingress-tcp-cm.yml create mode 100644 contrib/k8s-emc/_graveyard_/ingress-udp-cm.yml (limited to 'contrib/k8s-emc/_graveyard_') diff --git a/contrib/k8s-emc/_graveyard_/ingress-cm.yml b/contrib/k8s-emc/_graveyard_/ingress-cm.yml new file mode 100644 index 0000000..e88d22c --- /dev/null +++ b/contrib/k8s-emc/_graveyard_/ingress-cm.yml @@ -0,0 +1,8 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + namespace: emc + name: ingress-nginx-config + labels: + app: nginx + tier: ingress diff --git a/contrib/k8s-emc/_graveyard_/ingress-default-backend.yml b/contrib/k8s-emc/_graveyard_/ingress-default-backend.yml new file mode 100644 index 0000000..835239f --- /dev/null +++ b/contrib/k8s-emc/_graveyard_/ingress-default-backend.yml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: emc + name: ingress-default-http-backend + labels: + app: default-http-backend + tier: ingress +spec: + replicas: 1 + selector: + matchLabels: + app: default-http-backend + tier: ingress + template: + metadata: + labels: + app: default-http-backend + tier: ingress + spec: + terminationGracePeriodSeconds: 60 + nodeSelector: + streaming.spreadspace.org/zone: dist-lb + containers: + - name: backend + image: gcr.io/google_containers/defaultbackend:1.4 + livenessProbe: + httpGet: + path: /healthz + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 5 + ports: + - containerPort: 8080 + resources: + limits: + cpu: 10m + memory: 20Mi + requests: + cpu: 10m + memory: 20Mi +--- + +apiVersion: v1 +kind: Service +metadata: + namespace: emc + name: ingress-default-http-backend + labels: + app: default-http-backend + tier: ingress +spec: + ports: + - port: 80 + targetPort: 8080 + selector: + app: default-http-backend + tier: ingress diff --git a/contrib/k8s-emc/_graveyard_/ingress-ds.yml b/contrib/k8s-emc/_graveyard_/ingress-ds.yml new file mode 100644 index 0000000..885a812 --- /dev/null +++ b/contrib/k8s-emc/_graveyard_/ingress-ds.yml @@ -0,0 +1,70 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + namespace: emc + name: ingress-nginx-controller + labels: + app: nginx + tier: ingress +spec: + selector: + matchLabels: + app: nginx + tier: ingress + template: + metadata: + labels: + app: nginx + tier: ingress + annotations: + prometheus.io/port: '10254' + prometheus.io/scrape: 'true' + spec: + serviceAccountName: ingress-nginx + nodeSelector: + streaming.spreadspace.org/zone: dist-lb + hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet + containers: + - name: nginx-controller + image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.18.0 + args: + - /nginx-ingress-controller + - --default-backend-service=$(POD_NAMESPACE)/ingress-default-http-backend + - --configmap=$(POD_NAMESPACE)/ingress-nginx-config + - --tcp-services-configmap=$(POD_NAMESPACE)/ingress-tcp-config + - --udp-services-configmap=$(POD_NAMESPACE)/ingress-udp-config + - --annotations-prefix=nginx.ingress.kubernetes.io + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + ports: + - name: http + containerPort: 80 + - name: https + containerPort: 443 + livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 diff --git a/contrib/k8s-emc/_graveyard_/ingress-rbac.yml b/contrib/k8s-emc/_graveyard_/ingress-rbac.yml new file mode 100644 index 0000000..82247c7 --- /dev/null +++ b/contrib/k8s-emc/_graveyard_/ingress-rbac.yml @@ -0,0 +1,133 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + namespace: emc + name: ingress-nginx + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: ingress-nginx +rules: + - apiGroups: + - "" + resources: + - configmaps + - endpoints + - nodes + - pods + - secrets + verbs: + - list + - watch + - apiGroups: + - "" + resources: + - nodes + verbs: + - get + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - watch + - apiGroups: + - "extensions" + resources: + - ingresses + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - apiGroups: + - "extensions" + resources: + - ingresses/status + verbs: + - update + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: ingress-nginx +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: ingress-nginx +subjects: + - kind: ServiceAccount + name: ingress-nginx + namespace: emc + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: emc + name: ingress-nginx +rules: + - apiGroups: + - "" + resources: + - configmaps + - pods + - secrets + - namespaces + verbs: + - get + - apiGroups: + - "" + resources: + - configmaps + resourceNames: + # Defaults to "-" + # Here: "-" + # This has to be adapted if you change either parameter + # when launching the nginx-ingress-controller. + - "ingress-controller-leader-nginx" + verbs: + - get + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + namespace: emc + name: ingress-nginx +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: ingress-nginx +subjects: + - kind: ServiceAccount + name: ingress-nginx + namespace: emc diff --git a/contrib/k8s-emc/_graveyard_/ingress-tcp-cm.yml b/contrib/k8s-emc/_graveyard_/ingress-tcp-cm.yml new file mode 100644 index 0000000..425057f --- /dev/null +++ b/contrib/k8s-emc/_graveyard_/ingress-tcp-cm.yml @@ -0,0 +1,8 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + namespace: emc + name: ingress-tcp-config + labels: + app: tcp-services + tier: ingress diff --git a/contrib/k8s-emc/_graveyard_/ingress-udp-cm.yml b/contrib/k8s-emc/_graveyard_/ingress-udp-cm.yml new file mode 100644 index 0000000..7667661 --- /dev/null +++ b/contrib/k8s-emc/_graveyard_/ingress-udp-cm.yml @@ -0,0 +1,8 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + namespace: emc + name: ingress-udp-config + labels: + app: udp-services + tier: ingress -- cgit v1.2.3