From cc2c7d3b9731ea7557ac221317c370f34640e1e6 Mon Sep 17 00:00:00 2001 From: Yevgeny Khessin Date: Thu, 12 Oct 2023 12:40:23 -0400 Subject: [PATCH] Deleted duplicated files --- helm/tableland/configmap.yaml | 14 -- helm/tableland/ingress.yaml | 61 --------- helm/tableland/poddisruptionbudget.yaml | 11 -- helm/tableland/service.yaml | 22 ---- helm/tableland/serviceaccount.yaml | 13 -- helm/tableland/servicemonitor.yaml | 22 ---- helm/tableland/statefulset.yaml | 165 ------------------------ helm/tableland/values.yaml | 8 +- 8 files changed, 7 insertions(+), 309 deletions(-) delete mode 100644 helm/tableland/configmap.yaml delete mode 100644 helm/tableland/ingress.yaml delete mode 100644 helm/tableland/poddisruptionbudget.yaml delete mode 100644 helm/tableland/service.yaml delete mode 100644 helm/tableland/serviceaccount.yaml delete mode 100644 helm/tableland/servicemonitor.yaml delete mode 100644 helm/tableland/statefulset.yaml diff --git a/helm/tableland/configmap.yaml b/helm/tableland/configmap.yaml deleted file mode 100644 index 1a9e0a8d..00000000 --- a/helm/tableland/configmap.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "tableland.uname" . }}-config - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "tableland.uname" . }}" -data: -{{- range $path, $config := .Values.config }} - {{ $path }}: |- -{{ $config | indent 4 -}} -{{- end -}} \ No newline at end of file diff --git a/helm/tableland/ingress.yaml b/helm/tableland/ingress.yaml deleted file mode 100644 index ebf3253b..00000000 --- a/helm/tableland/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "tableland.uname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "tableland.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: 8080 - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/helm/tableland/poddisruptionbudget.yaml b/helm/tableland/poddisruptionbudget.yaml deleted file mode 100644 index 11a84f6a..00000000 --- a/helm/tableland/poddisruptionbudget.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if .Values.maxUnavailable }} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: "{{ template "tableland.uname" . }}-pdb" -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - app: "{{ template "tableland.uname" . }}" -{{- end }} diff --git a/helm/tableland/service.yaml b/helm/tableland/service.yaml deleted file mode 100644 index 993c272b..00000000 --- a/helm/tableland/service.yaml +++ /dev/null @@ -1,22 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: {{ template "tableland.uname" . }} - labels: - {{- include "tableland.labels" . | nindent 4 }} -{{- if .Values.service.labels }} -{{ toYaml .Values.service.labels | indent 4 }} -{{- end }} - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - publishNotReadyAddresses: true - selector: - {{- include "tableland.selectorLabels" . | nindent 4 }} - ports: - - name: {{ .Values.service.httpPortName | default "http" }} - port: {{ .Values.httpPort }} - - name: {{ .Values.service.httpsPortName | default "https" }} - port: {{ .Values.httpsPort }} - - name: {{ .Values.service.monHttpsPortName | default "mon-http" }} - port: {{ .Values.metricsPort }} \ No newline at end of file diff --git a/helm/tableland/serviceaccount.yaml b/helm/tableland/serviceaccount.yaml deleted file mode 100644 index 236a2572..00000000 --- a/helm/tableland/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.rbac.create -}} -{{- $fullName := include "tableland.uname" . -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: "{{ template "tableland.serviceAccount" . }}" - annotations: - {{- with .Values.rbac.serviceAccountAnnotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "tableland.labels" . | nindent 4 }} -{{- end -}} diff --git a/helm/tableland/servicemonitor.yaml b/helm/tableland/servicemonitor.yaml deleted file mode 100644 index 70ac7e21..00000000 --- a/helm/tableland/servicemonitor.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "tableland.uname" . }}-monitor - namespace: {{ .Release.Namespace }} - labels: - {{- include "tableland.labels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "tableland.selectorLabels" . | nindent 6 }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} - endpoints: - - port: {{ .Values.serviceMonitor.port }} - {{- if .Values.serviceMonitor.interval }} - interval: {{ .Values.serviceMonitor.interval }} - {{- end }} - path: {{ .Values.serviceMonitor.path | quote }} -{{- end }} \ No newline at end of file diff --git a/helm/tableland/statefulset.yaml b/helm/tableland/statefulset.yaml deleted file mode 100644 index 4515658c..00000000 --- a/helm/tableland/statefulset.yaml +++ /dev/null @@ -1,165 +0,0 @@ ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "tableland.uname" . }} - labels: - {{- include "tableland.labels" . | nindent 4 }} - annotations: -spec: - serviceName: {{ template "tableland.uname" . }} - selector: - matchLabels: - {{- include "tableland.selectorLabels" . | nindent 6 }} - replicas: 1 - updateStrategy: - type: {{ .Values.updateStrategy }} - {{- if .Values.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: {{ template "tableland.uname" . }} - labels: - {{- include "tableland.labels" . | nindent 8 }} - {{- with .Values.persistence.annotations }} - annotations: -{{ toYaml . | indent 8 }} - {{- end }} - spec: -{{ toYaml .Values.volumeClaimTemplate | indent 6 }} - {{- end }} - template: - metadata: - name: "{{ template "tableland.uname" . }}" - labels: - {{- include "tableland.labels" . | nindent 8 }} - annotations: - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{/* This forces a restart if the configmap has changed */}} - {{- if or .Values.config }} - configchecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }} - {{- end }} - spec: - securityContext: -{{ toYaml .Values.podSecurityContext | indent 8 }} - {{- if or .Values.rbac.create .Values.rbac.serviceAccountName }} - serviceAccountName: "{{ template "tableland.serviceAccount" . }}" - {{- end }} - automountServiceAccountToken: {{ .Values.rbac.automountToken }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 6 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }} - volumes: - {{- range .Values.secretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- if .defaultMode }} - defaultMode: {{ .defaultMode }} - {{- end }} - {{- end }} - {{- if .Values.config }} - - name: config - configMap: - name: {{ template "tableland.uname" . }}-config - {{- end }} - {{- if .Values.createCert }} - - name: tableland-certs - secret: - secretName: {{ template "tableland.uname" . }}-certs - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - enableServiceLinks: {{ .Values.enableServiceLinks }} - containers: - - name: "{{ template "tableland.name" . }}" - securityContext: -{{ toYaml .Values.securityContext | indent 10 }} - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - ports: - - name: http - containerPort: {{ .Values.httpPort }} - - name: https - containerPort: {{ .Values.httpsPort }} - - name: mon-http - containerPort: {{ .Values.metricsPort }} - resources: -{{ toYaml .Values.resources | indent 10 }} - readinessProbe: - httpGet: - path: /api/v1/health - port: 8080 - initialDelaySeconds: 15 - periodSeconds: 5 - livenessProbe: - httpGet: - path: /api/v1/health - port: 8080 - initialDelaySeconds: 15 - periodSeconds: 5 - env: - - name: node.name - valueFrom: - fieldRef: - fieldPath: metadata.name -{{- if .Values.extraEnvs }} -{{ toYaml .Values.extraEnvs | indent 10 }} -{{- end }} -{{- if .Values.envFrom }} - envFrom: -{{ toYaml .Values.envFrom | indent 10 }} -{{- end }} - volumeMounts: - {{- if .Values.persistence.enabled }} - - name: "{{ template "tableland.uname" . }}" - mountPath: /.tableland - {{- end }} - {{- if .Values.createCert }} - - name: tableland-certs - mountPath: /.tableland/certs - readOnly: true - {{- end }} - {{- range .Values.secretMounts }} - - name: {{ .name }} - mountPath: {{ .path }} - {{- if .subPath }} - subPath: {{ .subPath }} - {{- end }} - {{- end }} - {{- range $path, $config := .Values.config }} - - name: config - mountPath: /.tableland/{{ $path }} - subPath: {{ $path }} - readOnly: true - {{- end -}} - {{- if .Values.extraVolumeMounts }} - {{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }} -{{ tpl .Values.extraVolumeMounts . | indent 10 }} - {{- else }} -{{ toYaml .Values.extraVolumeMounts | indent 10 }} - {{- end }} - {{- end }} -{{- if .Values.lifecycle }} - lifecycle: -{{ toYaml .Values.lifecycle | indent 10 }} -{{- end }} - {{- if .Values.extraContainers }} - {{- if eq "string" (printf "%T" .Values.extraContainers) }} -{{ tpl .Values.extraContainers . | indent 6 }} - {{- else }} -{{ toYaml .Values.extraContainers | indent 6 }} - {{- end }} - {{- end }} diff --git a/helm/tableland/values.yaml b/helm/tableland/values.yaml index e97ee679..e28a9ea4 100644 --- a/helm/tableland/values.yaml +++ b/helm/tableland/values.yaml @@ -297,4 +297,10 @@ ingress: pathType: ImplementationSpecific tls: [] -lifecycle: {} \ No newline at end of file +lifecycle: {} + +serviceMonitor: + enabled: false + path: /metrics + port: mon-http + interval: 30s \ No newline at end of file