From 00b75ded917350db37336f5485cdce01b8f3b136 Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Thu, 14 Nov 2019 17:35:57 -0800 Subject: [PATCH 1/8] kuberhealthy 2.0.0 release chart with helm 3 Signed-off-by: Eric Greer --- stable/kuberhealthy/Chart.yaml | 20 +++-- stable/kuberhealthy/crds/khcheck.yaml | 16 ++++ .../khstate.yaml} | 3 +- .../kuberhealthy/templates/clusterrole.yaml | 49 ++++++++++- .../templates/clusterrolebinding.yaml | 2 +- stable/kuberhealthy/templates/deployment.yaml | 10 +-- .../templates/khcheck-daemonset.yaml | 67 +++++++++++++++ .../templates/khcheck-deployment.yaml | 84 +++++++++++++++++++ .../kuberhealthy/templates/khcheck-dns.yaml | 25 ++++++ .../templates/khcheck-pod-restarts.yaml | 26 ++++++ .../templates/khcheck-pod-status.yaml | 24 ++++++ .../templates/poddisruptionbudget.yaml | 3 +- stable/kuberhealthy/templates/role.yaml | 71 ---------------- .../kuberhealthy/templates/rolebinding.yaml | 11 --- stable/kuberhealthy/templates/service.yaml | 10 ++- .../templates/serviceaccount.yaml | 1 + .../templates/servicemonitor.yaml | 4 +- stable/kuberhealthy/values.yaml | 24 +++--- 18 files changed, 332 insertions(+), 118 deletions(-) create mode 100644 stable/kuberhealthy/crds/khcheck.yaml rename stable/kuberhealthy/{templates/customresourcedefinition.yaml => crds/khstate.yaml} (94%) create mode 100644 stable/kuberhealthy/templates/khcheck-daemonset.yaml create mode 100644 stable/kuberhealthy/templates/khcheck-deployment.yaml create mode 100644 stable/kuberhealthy/templates/khcheck-dns.yaml create mode 100644 stable/kuberhealthy/templates/khcheck-pod-restarts.yaml create mode 100644 stable/kuberhealthy/templates/khcheck-pod-status.yaml delete mode 100644 stable/kuberhealthy/templates/role.yaml delete mode 100644 stable/kuberhealthy/templates/rolebinding.yaml diff --git a/stable/kuberhealthy/Chart.yaml b/stable/kuberhealthy/Chart.yaml index 9431eddc7a07..5246285ffea0 100644 --- a/stable/kuberhealthy/Chart.yaml +++ b/stable/kuberhealthy/Chart.yaml @@ -1,9 +1,10 @@ -apiVersion: v1 -appVersion: "v1.0.2" -home: https://comcast.github.io/kuberhealthy/ -description: The official Helm chart for Kuberhealthy. +apiVersion: v2 name: kuberhealthy -version: 1.2.6 +appVersion: "2.0.0" +version: 2.0.0 +home: https://comcast.github.io/kuberhealthy/ +description: "An operator for synthetic test and monitoring. Works great with Prometheus." +type: application maintainers: - name: integrii email: eric.greer@comcast.com @@ -11,16 +12,21 @@ maintainers: email: jacob.martin@comcast.com - name: ihoegen email: ianhoegen@gmail.com + - name: jonnydawg + email: jonathan_phan@comcast.com + - name: joshulyne + email: joshulyne_park@comcast.com keywords: - kuberhealthy - kubernetes +- operator - monitoring - synthetic +- testing - comcast - health -- cluster - prometheus sources: - https://github.com/Comcast/kuberhealthy - https://github.com/helm/charts/tree/master/stable/kuberhealthy -icon: https://raw.githubusercontent.com/Comcast/kuberhealthy/helm/deploy/helm/kuberhealthy/kh-logo.png +icon: https://raw.githubusercontent.com/Comcast/kuberhealthy/master/images/logo-square.png diff --git a/stable/kuberhealthy/crds/khcheck.yaml b/stable/kuberhealthy/crds/khcheck.yaml new file mode 100644 index 000000000000..c298a93a89fd --- /dev/null +++ b/stable/kuberhealthy/crds/khcheck.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: khchecks.comcast.github.io +spec: + group: comcast.github.io + version: v1 + scope: Namespaced + names: + plural: khchecks + singular: khcheck + kind: KuberhealthyCheck + shortNames: + - khc + diff --git a/stable/kuberhealthy/templates/customresourcedefinition.yaml b/stable/kuberhealthy/crds/khstate.yaml similarity index 94% rename from stable/kuberhealthy/templates/customresourcedefinition.yaml rename to stable/kuberhealthy/crds/khstate.yaml index c4f1d5dca358..d6f91a9c03f6 100644 --- a/stable/kuberhealthy/templates/customresourcedefinition.yaml +++ b/stable/kuberhealthy/crds/khstate.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -11,4 +12,4 @@ spec: singular: khstate kind: KuberhealthyState shortNames: - - khs + - khs diff --git a/stable/kuberhealthy/templates/clusterrole.yaml b/stable/kuberhealthy/templates/clusterrole.yaml index 25a404d4aa2c..d207cde97952 100644 --- a/stable/kuberhealthy/templates/clusterrole.yaml +++ b/stable/kuberhealthy/templates/clusterrole.yaml @@ -1,17 +1,62 @@ +--- apiVersion: {{ template "rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ template "kuberhealthy.name" . }} rules: + - apiGroups: + - apps + resources: + - daemonsets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - extensions + resources: + - daemonsets + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch - apiGroups: - "" resources: - pods + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch + - apiGroups: + - comcast.github.io + resources: + - khstates + - khchecks + verbs: + - "*" + - apiGroups: + - "" + resources: - namespaces - componentstatuses - nodes verbs: - get - list - - watch - + - watch \ No newline at end of file diff --git a/stable/kuberhealthy/templates/clusterrolebinding.yaml b/stable/kuberhealthy/templates/clusterrolebinding.yaml index b9e39408697e..b35d4c59c0b2 100644 --- a/stable/kuberhealthy/templates/clusterrolebinding.yaml +++ b/stable/kuberhealthy/templates/clusterrolebinding.yaml @@ -11,4 +11,4 @@ subjects: - kind: ServiceAccount name: {{ template "kuberhealthy.name" . }} namespace: {{ .Release.Namespace }} - + \ No newline at end of file diff --git a/stable/kuberhealthy/templates/deployment.yaml b/stable/kuberhealthy/templates/deployment.yaml index 6dab8355a23e..80b86c09120b 100644 --- a/stable/kuberhealthy/templates/deployment.yaml +++ b/stable/kuberhealthy/templates/deployment.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -5,14 +6,11 @@ metadata: labels: app: {{ template "kuberhealthy.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} spec: replicas: {{ .Values.deployment.replicas }} selector: matchLabels: app: {{ template "kuberhealthy.name" . }} - release: {{ .Release.Name }} strategy: rollingUpdate: maxSurge: {{ .Values.deployment.maxSurge }} @@ -30,7 +28,7 @@ spec: {{- if .Values.prometheus.enableScraping -}} {{- if not .Values.deployment.podAnnotations }} annotations: - {{- end}} + {{- end }} prometheus.io/scrape: "true" prometheus.io/path: "/metrics" prometheus.io/port: "8080" @@ -39,8 +37,6 @@ spec: labels: app: {{ template "kuberhealthy.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} spec: serviceAccountName: kuberhealthy automountServiceAccountToken: true @@ -90,7 +86,7 @@ spec: cpu: {{ .Values.resources.requests.cpu }} memory: {{ .Values.resources.requests.memory }} restartPolicy: Always - terminationGracePeriodSeconds: 310 + terminationGracePeriodSeconds: 60 {{- if .Values.tolerations.master }} tolerations: - effect: NoSchedule diff --git a/stable/kuberhealthy/templates/khcheck-daemonset.yaml b/stable/kuberhealthy/templates/khcheck-daemonset.yaml new file mode 100644 index 000000000000..c9bb65f39040 --- /dev/null +++ b/stable/kuberhealthy/templates/khcheck-daemonset.yaml @@ -0,0 +1,67 @@ +{{- if .Values.check.daemonset }} +--- +apiVersion: comcast.github.io/v1 +kind: KuberhealthyCheck +metadata: + name: daemonset +spec: + runInterval: 15m + timeout: 12m + podSpec: + containers: + - env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CHECK_POD_TIMEOUT + value: "10m" + image: quay.io/comcast/kh-daemonset-check:1.0.0 + imagePullPolicy: IfNotPresent + name: main + resources: + requests: + cpu: 10m + memory: 50Mi + serviceAccountName: daemonset-khcheck +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: daemonset-khcheck +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: ds-admin +subjects: + - kind: ServiceAccount + name: daemonset-khcheck +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: ds-admin +rules: + - apiGroups: + - "" + - extensions + - app + resources: + - daemonsets + - pods + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: daemonset-khcheck +{{- end }} + diff --git a/stable/kuberhealthy/templates/khcheck-deployment.yaml b/stable/kuberhealthy/templates/khcheck-deployment.yaml new file mode 100644 index 000000000000..d7d9963b4eeb --- /dev/null +++ b/stable/kuberhealthy/templates/khcheck-deployment.yaml @@ -0,0 +1,84 @@ +{{- if .Values.check.deployment }} +--- +apiVersion: comcast.github.io/v1 +kind: KuberhealthyCheck +metadata: + name: deployment +spec: + runInterval: 30m + timeout: 10m + podSpec: + containers: + - name: deployment + image: quay.io/comcast/deployment-check:1.0.0 + imagePullPolicy: IfNotPresent + env: + - name: CHECK_DEPLOYMENT_REPLICAS + value: "4" + - name: CHECK_DEPLOYMENT_ROLLING_UPDATE + value: "true" + resources: + requests: + cpu: 25m + memory: 15Mi + limits: + cpu: 40m + restartPolicy: Always + serviceAccountName: deployment-sa + terminationGracePeriodSeconds: 60 +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: deployment-check-rb +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: deployment-service-role +subjects: + - kind: ServiceAccount + name: deployment-sa +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: deployment-service-role +rules: + - apiGroups: + - "apps" + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - list + - watch +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: deployment-sa +{{- end }} diff --git a/stable/kuberhealthy/templates/khcheck-dns.yaml b/stable/kuberhealthy/templates/khcheck-dns.yaml new file mode 100644 index 000000000000..5de42e34753f --- /dev/null +++ b/stable/kuberhealthy/templates/khcheck-dns.yaml @@ -0,0 +1,25 @@ +{{- if .Values.check.dnsInternal }} +--- +apiVersion: comcast.github.io/v1 +kind: KuberhealthyCheck +metadata: + name: dns-status-internal +spec: + runInterval: 2m + timeout: 15m + podSpec: + containers: + - env: + - name: CHECK_POD_TIMEOUT + value: "110s" + - name: HOSTNAME + value: "kubernetes.default" + image: quay.io/comcast/dns-status-check:1.0.0 + imagePullPolicy: IfNotPresent + name: main + resources: + requests: + cpu: 10m + memory: 50Mi +{{- end }} + diff --git a/stable/kuberhealthy/templates/khcheck-pod-restarts.yaml b/stable/kuberhealthy/templates/khcheck-pod-restarts.yaml new file mode 100644 index 000000000000..6066bd26b871 --- /dev/null +++ b/stable/kuberhealthy/templates/khcheck-pod-restarts.yaml @@ -0,0 +1,26 @@ +{{- if .Values.check.podRestarts }} +--- +apiVersion: comcast.github.io/v1 +kind: KuberhealthyCheck +metadata: + name: pod-restarts +spec: + runInterval: 60m + timeout: 62m + podSpec: + containers: + - env: + - name: POD_NAMESPACE + value: "kube-system" + - name: CHECK_RUN_WINDOW + value: "55m" + - name: MAX_FAILURES_ALLOWED + value: "5" + image: quay.io/comcast/pod-restarts-check:1.0.0 + imagePullPolicy: IfNotPresent + name: main + resources: + requests: + cpu: 10m + memory: 50Mi +{{- end }} diff --git a/stable/kuberhealthy/templates/khcheck-pod-status.yaml b/stable/kuberhealthy/templates/khcheck-pod-status.yaml new file mode 100644 index 000000000000..770a344640e8 --- /dev/null +++ b/stable/kuberhealthy/templates/khcheck-pod-status.yaml @@ -0,0 +1,24 @@ +{{- if .Values.check.podStatus }} +--- +apiVersion: comcast.github.io/v1 +kind: KuberhealthyCheck +metadata: + name: pod-status-check +spec: + runInterval: 5m + timeout: 15m + podSpec: + containers: + - env: + - name: TARGET_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: quay.io/comcast/pod-status-check:1.0.0 + imagePullPolicy: Always + name: main + resources: + requests: + cpu: 10m + memory: 50Mi +{{- end }} diff --git a/stable/kuberhealthy/templates/poddisruptionbudget.yaml b/stable/kuberhealthy/templates/poddisruptionbudget.yaml index 1c6050998211..646be7acf6e3 100644 --- a/stable/kuberhealthy/templates/poddisruptionbudget.yaml +++ b/stable/kuberhealthy/templates/poddisruptionbudget.yaml @@ -1,3 +1,4 @@ +--- apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: @@ -8,5 +9,3 @@ spec: matchLabels: app: {{ template "kuberhealthy.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} diff --git a/stable/kuberhealthy/templates/role.yaml b/stable/kuberhealthy/templates/role.yaml deleted file mode 100644 index 85bd188d5640..000000000000 --- a/stable/kuberhealthy/templates/role.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: {{ template "rbac.apiVersion" . }} -kind: Role -metadata: - name: {{ template "kuberhealthy.name" . }} -rules: - - apiGroups: - - apps - resources: - - daemonsets - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - - apiGroups: - - extensions - resources: - - daemonsets - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - pods - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - - apiGroups: - - comcast.github.io - resources: - - khstates - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list diff --git a/stable/kuberhealthy/templates/rolebinding.yaml b/stable/kuberhealthy/templates/rolebinding.yaml deleted file mode 100644 index f40c2465416b..000000000000 --- a/stable/kuberhealthy/templates/rolebinding.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: {{ template "rbac.apiVersion" . }} -kind: RoleBinding -metadata: - name: {{ template "kuberhealthy.name" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "kuberhealthy.name" . }} -subjects: -- kind: ServiceAccount - name: {{ template "kuberhealthy.name" . }} diff --git a/stable/kuberhealthy/templates/service.yaml b/stable/kuberhealthy/templates/service.yaml index 2468e5c50c59..fd58fd12f508 100644 --- a/stable/kuberhealthy/templates/service.yaml +++ b/stable/kuberhealthy/templates/service.yaml @@ -1,12 +1,17 @@ +--- apiVersion: v1 kind: Service metadata: labels: app: {{ template "kuberhealthy.name" . }} - release: {{ .Release.Name }} name: {{ template "kuberhealthy.name" . }} - {{- if .Values.service.annotations }} + {{- if or .Values.prometheus.enabled .Values.service.annotations }} annotations: + {{- if .Values.prometheus.enabled }} + prometheus.io/scrape: "true" + prometheus.io/port: "80" + prometheus.io/path: "/metrics" + {{- end }} {{- range $key, $value := .Values.service.annotations }} {{ $key }}: {{ $value | quote }} {{- end }} @@ -19,4 +24,3 @@ spec: targetPort: http selector: app: {{ template "kuberhealthy.name" . }} - release: {{ .Release.Name }} diff --git a/stable/kuberhealthy/templates/serviceaccount.yaml b/stable/kuberhealthy/templates/serviceaccount.yaml index c215b89c7d8e..00ec87d3a7be 100644 --- a/stable/kuberhealthy/templates/serviceaccount.yaml +++ b/stable/kuberhealthy/templates/serviceaccount.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: diff --git a/stable/kuberhealthy/templates/servicemonitor.yaml b/stable/kuberhealthy/templates/servicemonitor.yaml index a7a7d3f62d66..fd3756b18e72 100644 --- a/stable/kuberhealthy/templates/servicemonitor.yaml +++ b/stable/kuberhealthy/templates/servicemonitor.yaml @@ -1,13 +1,12 @@ {{- if .Values.prometheus.enabled -}} {{- if .Values.prometheus.serviceMonitor -}} +--- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: app: {{ template "kuberhealthy.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} prometheus: {{ .Values.prometheus.name }} name: {{ template "kuberhealthy.name" . }} spec: @@ -15,7 +14,6 @@ spec: selector: matchLabels: app: {{ .Chart.Name }} - release: {{ .Release.Name }} namespaceSelector: matchNames: - {{ .Release.Namespace }} diff --git a/stable/kuberhealthy/values.yaml b/stable/kuberhealthy/values.yaml index 50962e9349d7..cb5aaca778fb 100644 --- a/stable/kuberhealthy/values.yaml +++ b/stable/kuberhealthy/values.yaml @@ -5,21 +5,21 @@ prometheus: enabled: false name: "prometheus" - enableScraping: true + enableScraping: false serviceMonitor: false - enableAlerting: true + enableAlerting: false image: repository: quay.io/comcast/kuberhealthy - tag: v1.0.2 + tag: 2.0.0 resources: requests: - cpu: 100m - memory: 80Mi - limits: cpu: 400m - memory: 200Mi + memory: 300Mi + limits: + cpu: 2 + memory: 1G1 tolerations: # change to true to tolerate and deploy to masters @@ -33,10 +33,7 @@ deployment: podAnnotations: {} command: - /app/kuberhealthy - # use this to override location of the test-image, see: https://github.com/Comcast/kuberhealthy/blob/master/docs/FLAGS.md # args: - # - -dsPauseContainerImageOverride - # - your-repo/google_containers/pause:0.8.0 securityContext: runAsNonRoot: true @@ -54,3 +51,10 @@ service: externalPort: 80 type: ClusterIP annotations: {} + +check: + daemonset: true + deployment: true + dnsInternal: true + podRestarts: true + podStatus: true From 9338aa7865dc821fbd7db2ca74d6644b3a8b5fec Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Fri, 15 Nov 2019 10:48:30 -0800 Subject: [PATCH 2/8] dropping apiVersion back to v1 for charts circleci Signed-off-by: Eric Greer --- stable/kuberhealthy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/kuberhealthy/Chart.yaml b/stable/kuberhealthy/Chart.yaml index 5246285ffea0..5fedcd23e03d 100644 --- a/stable/kuberhealthy/Chart.yaml +++ b/stable/kuberhealthy/Chart.yaml @@ -1,4 +1,4 @@ -apiVersion: v2 +apiVersion: v1 name: kuberhealthy appVersion: "2.0.0" version: 2.0.0 From 4f79cadafc89521e2a6d88f45e0b8d12f50e0dd2 Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Fri, 15 Nov 2019 11:43:32 -0800 Subject: [PATCH 3/8] disable pod restarts and status checks by default Signed-off-by: Eric Greer --- stable/kuberhealthy/Chart.yaml | 2 +- stable/kuberhealthy/values.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stable/kuberhealthy/Chart.yaml b/stable/kuberhealthy/Chart.yaml index 5fedcd23e03d..4ff66d14b513 100644 --- a/stable/kuberhealthy/Chart.yaml +++ b/stable/kuberhealthy/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: kuberhealthy -appVersion: "2.0.0" version: 2.0.0 +appVersion: 2.0.0 home: https://comcast.github.io/kuberhealthy/ description: "An operator for synthetic test and monitoring. Works great with Prometheus." type: application diff --git a/stable/kuberhealthy/values.yaml b/stable/kuberhealthy/values.yaml index cb5aaca778fb..1589707c5622 100644 --- a/stable/kuberhealthy/values.yaml +++ b/stable/kuberhealthy/values.yaml @@ -56,5 +56,5 @@ check: daemonset: true deployment: true dnsInternal: true - podRestarts: true - podStatus: true + podRestarts: false + podStatus: false From 3430f8bbfadba9f290c5ba23ab8b26656c56237d Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Fri, 15 Nov 2019 12:52:46 -0800 Subject: [PATCH 4/8] more owners Signed-off-by: Eric Greer --- stable/kuberhealthy/OWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stable/kuberhealthy/OWNERS b/stable/kuberhealthy/OWNERS index 072f42ea54c5..0e4d91fb0b5e 100644 --- a/stable/kuberhealthy/OWNERS +++ b/stable/kuberhealthy/OWNERS @@ -2,7 +2,11 @@ approvers: - integrii - lolimjake - ihoegen +- jonnydawg +- joshulyne reviewers: - integrii - lolimjake - ihoegen +- jonnydawg +- joshulyne From 8d7caba4bb7bc53faa55aebb993f7e97777988d7 Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Fri, 15 Nov 2019 13:25:25 -0800 Subject: [PATCH 5/8] deployment check 1.0.1 Signed-off-by: Eric Greer --- stable/kuberhealthy/Chart.yaml | 2 +- stable/kuberhealthy/templates/khcheck-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/kuberhealthy/Chart.yaml b/stable/kuberhealthy/Chart.yaml index 4ff66d14b513..b4886188415e 100644 --- a/stable/kuberhealthy/Chart.yaml +++ b/stable/kuberhealthy/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: kuberhealthy -version: 2.0.0 appVersion: 2.0.0 +version: 2.0.0 home: https://comcast.github.io/kuberhealthy/ description: "An operator for synthetic test and monitoring. Works great with Prometheus." type: application diff --git a/stable/kuberhealthy/templates/khcheck-deployment.yaml b/stable/kuberhealthy/templates/khcheck-deployment.yaml index d7d9963b4eeb..95a3399208f3 100644 --- a/stable/kuberhealthy/templates/khcheck-deployment.yaml +++ b/stable/kuberhealthy/templates/khcheck-deployment.yaml @@ -10,7 +10,7 @@ spec: podSpec: containers: - name: deployment - image: quay.io/comcast/deployment-check:1.0.0 + image: quay.io/comcast/deployment-check:1.0.1 imagePullPolicy: IfNotPresent env: - name: CHECK_DEPLOYMENT_REPLICAS From c0d7167f5838db159e95b0dae0f7e1724380036b Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Fri, 15 Nov 2019 15:04:41 -0800 Subject: [PATCH 6/8] deployment 1.0.2 Signed-off-by: Eric Greer --- stable/kuberhealthy/templates/khcheck-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/kuberhealthy/templates/khcheck-deployment.yaml b/stable/kuberhealthy/templates/khcheck-deployment.yaml index 95a3399208f3..1bda49538908 100644 --- a/stable/kuberhealthy/templates/khcheck-deployment.yaml +++ b/stable/kuberhealthy/templates/khcheck-deployment.yaml @@ -10,7 +10,7 @@ spec: podSpec: containers: - name: deployment - image: quay.io/comcast/deployment-check:1.0.1 + image: quay.io/comcast/deployment-check:1.0.2 imagePullPolicy: IfNotPresent env: - name: CHECK_DEPLOYMENT_REPLICAS From 9448ebb94ff81cc44db7009e7df1bdea8cf4e04c Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Mon, 9 Dec 2019 10:59:26 -0800 Subject: [PATCH 7/8] newline fixes and upping check versions Signed-off-by: Eric Greer --- stable/kuberhealthy/Chart.yaml | 2 +- stable/kuberhealthy/templates/_helpers.tpl | 1 + stable/kuberhealthy/templates/clusterrole.yaml | 3 ++- .../kuberhealthy/templates/clusterrolebinding.yaml | 2 +- stable/kuberhealthy/templates/configmap.yaml | 1 + stable/kuberhealthy/templates/deployment.yaml | 11 +---------- .../kuberhealthy/templates/khcheck-daemonset.yaml | 2 +- .../kuberhealthy/templates/khcheck-deployment.yaml | 3 ++- stable/kuberhealthy/templates/khcheck-dns.yaml | 1 - .../templates/khcheck-pod-restarts.yaml | 13 +++++++------ .../kuberhealthy/templates/khcheck-pod-status.yaml | 2 +- .../kuberhealthy/templates/poddisruptionbudget.yaml | 1 + stable/kuberhealthy/templates/service.yaml | 1 + stable/kuberhealthy/templates/serviceaccount.yaml | 1 + stable/kuberhealthy/templates/servicemonitor.yaml | 1 + 15 files changed, 22 insertions(+), 23 deletions(-) diff --git a/stable/kuberhealthy/Chart.yaml b/stable/kuberhealthy/Chart.yaml index b4886188415e..a438b1380145 100644 --- a/stable/kuberhealthy/Chart.yaml +++ b/stable/kuberhealthy/Chart.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: v2 name: kuberhealthy appVersion: 2.0.0 version: 2.0.0 diff --git a/stable/kuberhealthy/templates/_helpers.tpl b/stable/kuberhealthy/templates/_helpers.tpl index 75ca42adc85e..b9f25c7784e1 100644 --- a/stable/kuberhealthy/templates/_helpers.tpl +++ b/stable/kuberhealthy/templates/_helpers.tpl @@ -16,3 +16,4 @@ Return the appropriate apiVersion for RBAC APIs. "rbac.authorization.k8s.io/v1beta1" {{- end -}} {{- end -}} + diff --git a/stable/kuberhealthy/templates/clusterrole.yaml b/stable/kuberhealthy/templates/clusterrole.yaml index d207cde97952..698e2631a259 100644 --- a/stable/kuberhealthy/templates/clusterrole.yaml +++ b/stable/kuberhealthy/templates/clusterrole.yaml @@ -59,4 +59,5 @@ rules: verbs: - get - list - - watch \ No newline at end of file + - watch + diff --git a/stable/kuberhealthy/templates/clusterrolebinding.yaml b/stable/kuberhealthy/templates/clusterrolebinding.yaml index b35d4c59c0b2..04beb2c84975 100644 --- a/stable/kuberhealthy/templates/clusterrolebinding.yaml +++ b/stable/kuberhealthy/templates/clusterrolebinding.yaml @@ -11,4 +11,4 @@ subjects: - kind: ServiceAccount name: {{ template "kuberhealthy.name" . }} namespace: {{ .Release.Namespace }} - \ No newline at end of file + diff --git a/stable/kuberhealthy/templates/configmap.yaml b/stable/kuberhealthy/templates/configmap.yaml index 716b8de7e638..31fb16a73177 100644 --- a/stable/kuberhealthy/templates/configmap.yaml +++ b/stable/kuberhealthy/templates/configmap.yaml @@ -29,3 +29,4 @@ data: description: Kuberhealthy shows that the cluster is not healthy {{- end -}} {{- end -}} + diff --git a/stable/kuberhealthy/templates/deployment.yaml b/stable/kuberhealthy/templates/deployment.yaml index 80b86c09120b..7a4452c53251 100644 --- a/stable/kuberhealthy/templates/deployment.yaml +++ b/stable/kuberhealthy/templates/deployment.yaml @@ -24,16 +24,6 @@ spec: {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} - {{- if .Values.prometheus.enabled -}} - {{- if .Values.prometheus.enableScraping -}} - {{- if not .Values.deployment.podAnnotations }} - annotations: - {{- end }} - prometheus.io/scrape: "true" - prometheus.io/path: "/metrics" - prometheus.io/port: "8080" - {{- end }} - {{- end }} labels: app: {{ template "kuberhealthy.name" . }} chart: {{ .Chart.Name }} @@ -93,3 +83,4 @@ spec: key: node-role.kubernetes.io/master operator: Exists {{- end -}} + diff --git a/stable/kuberhealthy/templates/khcheck-daemonset.yaml b/stable/kuberhealthy/templates/khcheck-daemonset.yaml index c9bb65f39040..7e422df1d1f5 100644 --- a/stable/kuberhealthy/templates/khcheck-daemonset.yaml +++ b/stable/kuberhealthy/templates/khcheck-daemonset.yaml @@ -16,7 +16,7 @@ spec: fieldPath: metadata.namespace - name: CHECK_POD_TIMEOUT value: "10m" - image: quay.io/comcast/kh-daemonset-check:1.0.0 + image: quay.io/comcast/kh-daemonset-check:2.0.0 imagePullPolicy: IfNotPresent name: main resources: diff --git a/stable/kuberhealthy/templates/khcheck-deployment.yaml b/stable/kuberhealthy/templates/khcheck-deployment.yaml index 1bda49538908..9570a9ed43cb 100644 --- a/stable/kuberhealthy/templates/khcheck-deployment.yaml +++ b/stable/kuberhealthy/templates/khcheck-deployment.yaml @@ -10,7 +10,7 @@ spec: podSpec: containers: - name: deployment - image: quay.io/comcast/deployment-check:1.0.2 + image: quay.io/comcast/deployment-check:1.0.3 imagePullPolicy: IfNotPresent env: - name: CHECK_DEPLOYMENT_REPLICAS @@ -82,3 +82,4 @@ kind: ServiceAccount metadata: name: deployment-sa {{- end }} + diff --git a/stable/kuberhealthy/templates/khcheck-dns.yaml b/stable/kuberhealthy/templates/khcheck-dns.yaml index 5de42e34753f..95c04c56b8c1 100644 --- a/stable/kuberhealthy/templates/khcheck-dns.yaml +++ b/stable/kuberhealthy/templates/khcheck-dns.yaml @@ -22,4 +22,3 @@ spec: cpu: 10m memory: 50Mi {{- end }} - diff --git a/stable/kuberhealthy/templates/khcheck-pod-restarts.yaml b/stable/kuberhealthy/templates/khcheck-pod-restarts.yaml index 6066bd26b871..7762ebf1954d 100644 --- a/stable/kuberhealthy/templates/khcheck-pod-restarts.yaml +++ b/stable/kuberhealthy/templates/khcheck-pod-restarts.yaml @@ -5,22 +5,23 @@ kind: KuberhealthyCheck metadata: name: pod-restarts spec: - runInterval: 60m - timeout: 62m + runInterval: 5m + timeout: 10m podSpec: containers: - env: - name: POD_NAMESPACE value: "kube-system" - - name: CHECK_RUN_WINDOW - value: "55m" + - name: CHECK_POD_TIMEOUT + value: "10m" - name: MAX_FAILURES_ALLOWED - value: "5" - image: quay.io/comcast/pod-restarts-check:1.0.0 + value: "10" + image: quay.io/comcast/pod-restarts-check:2.0.0 imagePullPolicy: IfNotPresent name: main resources: requests: cpu: 10m memory: 50Mi + restartPolicy: Never {{- end }} diff --git a/stable/kuberhealthy/templates/khcheck-pod-status.yaml b/stable/kuberhealthy/templates/khcheck-pod-status.yaml index 770a344640e8..91b0523f5a2d 100644 --- a/stable/kuberhealthy/templates/khcheck-pod-status.yaml +++ b/stable/kuberhealthy/templates/khcheck-pod-status.yaml @@ -14,7 +14,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: quay.io/comcast/pod-status-check:1.0.0 + image: quay.io/comcast/pod-status-check:1.0.1 imagePullPolicy: Always name: main resources: diff --git a/stable/kuberhealthy/templates/poddisruptionbudget.yaml b/stable/kuberhealthy/templates/poddisruptionbudget.yaml index 646be7acf6e3..60bbe36da007 100644 --- a/stable/kuberhealthy/templates/poddisruptionbudget.yaml +++ b/stable/kuberhealthy/templates/poddisruptionbudget.yaml @@ -9,3 +9,4 @@ spec: matchLabels: app: {{ template "kuberhealthy.name" . }} chart: {{ .Chart.Name }} + diff --git a/stable/kuberhealthy/templates/service.yaml b/stable/kuberhealthy/templates/service.yaml index fd58fd12f508..104afcfe3e9a 100644 --- a/stable/kuberhealthy/templates/service.yaml +++ b/stable/kuberhealthy/templates/service.yaml @@ -24,3 +24,4 @@ spec: targetPort: http selector: app: {{ template "kuberhealthy.name" . }} + diff --git a/stable/kuberhealthy/templates/serviceaccount.yaml b/stable/kuberhealthy/templates/serviceaccount.yaml index 00ec87d3a7be..793d3519bd40 100644 --- a/stable/kuberhealthy/templates/serviceaccount.yaml +++ b/stable/kuberhealthy/templates/serviceaccount.yaml @@ -3,3 +3,4 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "kuberhealthy.name" . }} + diff --git a/stable/kuberhealthy/templates/servicemonitor.yaml b/stable/kuberhealthy/templates/servicemonitor.yaml index fd3756b18e72..5caf9bc17d73 100644 --- a/stable/kuberhealthy/templates/servicemonitor.yaml +++ b/stable/kuberhealthy/templates/servicemonitor.yaml @@ -23,3 +23,4 @@ spec: bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token {{- end -}} {{- end -}} + From 4317d390ad7431346d8f2e52c5629a9f2559c085 Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Mon, 9 Dec 2019 15:26:58 -0800 Subject: [PATCH 8/8] add namespace Signed-off-by: Eric Greer --- stable/kuberhealthy/templates/namespace.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 stable/kuberhealthy/templates/namespace.yaml diff --git a/stable/kuberhealthy/templates/namespace.yaml b/stable/kuberhealthy/templates/namespace.yaml new file mode 100644 index 000000000000..fb0eee5b93ab --- /dev/null +++ b/stable/kuberhealthy/templates/namespace.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: kuberhealthy +spec: + finalizers: + - kubernetes