From fd2a075536c9b374b82567e7e47eefb35e653b0b Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Larsen Date: Tue, 21 Mar 2023 10:13:53 +0100 Subject: [PATCH] Remove cronjob-monitor Signed-off-by: Mikkel Oscar Lyderik Larsen --- .../manifests/cronjob-monitor/deployment.yaml | 37 ------------------- cluster/manifests/cronjob-monitor/rbac.yaml | 30 --------------- cluster/manifests/cronjob-monitor/vpa.yaml | 20 ---------- cluster/manifests/deletions.yaml | 13 +++++++ 4 files changed, 13 insertions(+), 87 deletions(-) delete mode 100644 cluster/manifests/cronjob-monitor/deployment.yaml delete mode 100644 cluster/manifests/cronjob-monitor/rbac.yaml delete mode 100644 cluster/manifests/cronjob-monitor/vpa.yaml diff --git a/cluster/manifests/cronjob-monitor/deployment.yaml b/cluster/manifests/cronjob-monitor/deployment.yaml deleted file mode 100644 index 062896de7b..0000000000 --- a/cluster/manifests/cronjob-monitor/deployment.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cronjob-monitor - namespace: kube-system - labels: - application: kubernetes - component: cronjob-monitor -spec: - replicas: 1 - selector: - matchLabels: - deployment: cronjob-monitor - template: - metadata: - labels: - deployment: cronjob-monitor - application: kubernetes - component: cronjob-monitor - annotations: - logging/destination: "{{.Cluster.ConfigItems.log_destination_infra}}" - spec: - dnsConfig: - options: - - name: ndots - value: "1" - serviceAccountName: cronjob-monitor - containers: - - name: cronjob-monitor - image: "container-registry.zalando.net/teapot/cronjob-monitor:master-8" - resources: - limits: - cpu: 5m - memory: 4Gi - requests: - cpu: 5m - memory: 4Gi diff --git a/cluster/manifests/cronjob-monitor/rbac.yaml b/cluster/manifests/cronjob-monitor/rbac.yaml deleted file mode 100644 index 6b1153e398..0000000000 --- a/cluster/manifests/cronjob-monitor/rbac.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: cronjob-monitor - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: cronjob-monitor -rules: -- apiGroups: ["batch"] - resources: ["cronjobs"] - verbs: ["get", "list", "watch", "patch", "update"] -- apiGroups: ["batch"] - resources: ["jobs"] - verbs: ["get", "list", "watch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: cronjob-monitor -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cronjob-monitor -subjects: -- kind: ServiceAccount - name: cronjob-monitor - namespace: kube-system diff --git a/cluster/manifests/cronjob-monitor/vpa.yaml b/cluster/manifests/cronjob-monitor/vpa.yaml deleted file mode 100644 index a6d896712a..0000000000 --- a/cluster/manifests/cronjob-monitor/vpa.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: autoscaling.k8s.io/v1beta2 -kind: VerticalPodAutoscaler -metadata: - name: cronjob-monitor - namespace: kube-system - labels: - application: kubernetes - component: cronjob-monitor -spec: - targetRef: - apiVersion: apps/v1 - kind: Deployment - name: cronjob-monitor - updatePolicy: - updateMode: Auto - resourcePolicy: - containerPolicies: - - containerName: cronjob-monitor - maxAllowed: - memory: 4Gi diff --git a/cluster/manifests/deletions.yaml b/cluster/manifests/deletions.yaml index 87a5c8a111..9c2b3e340a 100644 --- a/cluster/manifests/deletions.yaml +++ b/cluster/manifests/deletions.yaml @@ -4,9 +4,22 @@ pre_apply: - name: "routegroup-admitter.teapot.zalan.do" kind: ValidatingWebhookConfiguration {{ end }} +- name: cronjob-monitor + namespace: kube-system + kind: VerticalPodAutoscaler +- name: cronjob-monitor + namespace: kube-system + kind: Deployment # everything defined under here will be deleted after applying the manifests post_apply: +- name: cronjob-monitor + kind: ClusterRole +- name: cronjob-monitor + kind: ClusterRoleBinding +- name: cronjob-monitor + namespace: kube-system + kind: ServiceAccount {{ if eq .ConfigItems.teapot_admission_controller_process_resources "true" }} - name: limits namespace: default