From 8d382169649210a6b54d1b3f91168f98bce0bd61 Mon Sep 17 00:00:00 2001 From: sys_softwarerecipes Date: Tue, 5 Mar 2024 07:22:21 +0530 Subject: [PATCH] adding chart evi-clustering-archiving-2.1.0 --- .../.helmignore | 23 ++++ .../evi-clustering-archiving-2.1.0/Chart.yaml | 6 + .../templates/_helpers.tpl | 75 +++++++++++ .../templates/configmap.yaml | 27 ++++ .../templates/deployment.yaml | 83 +++++++++++++ .../templates/ingress.yaml | 74 +++++++++++ .../templates/rola.yaml | 39 ++++++ .../templates/secret.yaml | 21 ++++ .../templates/service.yaml | 29 +++++ .../templates/serviceaccount.yaml | 20 +++ .../templates/tests/test-connection.yaml | 28 +++++ .../values.yaml | 117 ++++++++++++++++++ 12 files changed, 542 insertions(+) create mode 100644 charts/evi-clustering-archiving-2.1.0/.helmignore create mode 100644 charts/evi-clustering-archiving-2.1.0/Chart.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/_helpers.tpl create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/configmap.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/deployment.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/ingress.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/rola.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/secret.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/service.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/serviceaccount.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/templates/tests/test-connection.yaml create mode 100644 charts/evi-clustering-archiving-2.1.0/values.yaml diff --git a/charts/evi-clustering-archiving-2.1.0/.helmignore b/charts/evi-clustering-archiving-2.1.0/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/evi-clustering-archiving-2.1.0/Chart.yaml b/charts/evi-clustering-archiving-2.1.0/Chart.yaml new file mode 100644 index 0000000..bbab9d6 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +appVersion: 1.16.0 +description: A Helm chart for Kubernetes +name: evi-clustering-archiving +type: application +version: 2.1.0 diff --git a/charts/evi-clustering-archiving-2.1.0/templates/_helpers.tpl b/charts/evi-clustering-archiving-2.1.0/templates/_helpers.tpl new file mode 100644 index 0000000..c984f5f --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/_helpers.tpl @@ -0,0 +1,75 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +{{/* +Expand the name of the chart. +*/}} +{{- define "spark-cluster.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "spark-cluster.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "spark-cluster.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "spark-cluster.labels" -}} +helm.sh/chart: {{ include "spark-cluster.chart" . }} +{{ include "spark-cluster.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "spark-cluster.selectorLabels" -}} +app.kubernetes.io/name: {{ include "spark-cluster.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "spark-cluster.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "spark-cluster.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/evi-clustering-archiving-2.1.0/templates/configmap.yaml b/charts/evi-clustering-archiving-2.1.0/templates/configmap.yaml new file mode 100644 index 0000000..4d2d945 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/configmap.yaml @@ -0,0 +1,27 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.global.namespace.value }} + name: {{ .Values.configMap.name }} +data: + ns.config: | + ns = {{ .Values.global.namespace.value }} + app.config: | + GP_HOST = "{{ .Values.configMap.sqlDB.addr }}" + GP_PORT = "{{ .Values.configMap.sqlDB.port }}" + hadoop.config: | + addr = {{ .Values.configMap.hdfs.addr }} + nnPort = {{ .Values.configMap.hdfs.port }} diff --git a/charts/evi-clustering-archiving-2.1.0/templates/deployment.yaml b/charts/evi-clustering-archiving-2.1.0/templates/deployment.yaml new file mode 100644 index 0000000..647790e --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/deployment.yaml @@ -0,0 +1,83 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +{{- if .Values.global.namespace.create -}} +apiVersion: v1 +kind: Namespace +metadata: + name: {{ .Values.global.namespace.value }} +{{ if .Values.global.namespace.istioInjection.create }} + labels: + istio-injection: enabled +{{ end }} +{{- end -}} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: evi-clustering-archiving + namespace: {{ .Values.global.namespace.value }} + labels: + version: v1 + annotations: + container.apparmor.security.beta.kubernetes.io/spark-cluster: runtime/default +spec: + replicas: 1 + selector: + matchLabels: + app: spark-cluster + version: v1 + template: + metadata: + labels: + app: spark-cluster + sidecar.istio.io/inject: "{{ .Values.istioInjection }}" + version: v1 + spec: + nodeSelector: + feature.node.kubernetes.io/cpu-cpuid.AVX512VNNI: 'true' + feature.node.kubernetes.io/cpu-cpuid.AVX2: 'true' + securityContext: + seccompProfile: + type: RuntimeDefault + containers: + #- name: spark-cluster + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + #- containerPort: 8088 + - containerPort: {{ .Values.image.port }} + resources: + limits: + cpu: "120" + memory: 64Gi + requests: + cpu: "10m" + memory: 400Mi + volumeMounts: + - name: {{ .Values.volumes.name }} + readOnly: {{ .Values.volumes.readOnly }} + mountPath: "{{ .Values.volumes.mountPath }}" + - name: spark-cluster-cm-volume + mountPath: "/opt/configure" + securityContext: + # readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + volumes: + - name: {{ .Values.volumes.name }} + secret: + secretName: {{ .Values.secret.secretName }} + - name: spark-cluster-cm-volume + configMap: + name: {{ .Values.configMap.name }} diff --git a/charts/evi-clustering-archiving-2.1.0/templates/ingress.yaml b/charts/evi-clustering-archiving-2.1.0/templates/ingress.yaml new file mode 100644 index 0000000..99fed23 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/ingress.yaml @@ -0,0 +1,74 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "spark-cluster.fullname" . -}} +{{- $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 "spark-cluster.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: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/evi-clustering-archiving-2.1.0/templates/rola.yaml b/charts/evi-clustering-archiving-2.1.0/templates/rola.yaml new file mode 100644 index 0000000..2b82c54 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/rola.yaml @@ -0,0 +1,39 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: {{ .Values.global.namespace.value }} + name: spark-role +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["*"] +- apiGroups: [""] + resources: ["services"] + verbs: ["*"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: spark-role-binding + namespace: {{ .Values.global.namespace.value }} +subjects: +- kind: ServiceAccount + name: spark + namespace: {{ .Values.global.namespace.value }} +roleRef: + kind: Role + name: spark-role + apiGroup: rbac.authorization.k8s.io diff --git a/charts/evi-clustering-archiving-2.1.0/templates/secret.yaml b/charts/evi-clustering-archiving-2.1.0/templates/secret.yaml new file mode 100644 index 0000000..65d492b --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/secret.yaml @@ -0,0 +1,21 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.secret.secretName }} + namespace: {{ .Values.global.namespace.value }} +type: Opaque +data: + GP_PASSWORD: {{ required "A valid secret.auth.password is required!" .Values.secret.auth.password }} diff --git a/charts/evi-clustering-archiving-2.1.0/templates/service.yaml b/charts/evi-clustering-archiving-2.1.0/templates/service.yaml new file mode 100644 index 0000000..ac8a995 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/service.yaml @@ -0,0 +1,29 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Values.global.namespace.value }} + name: evi-clustering-archiving + labels: + app: spark-cluster +spec: + type: {{ .Values.image.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + nodePort: {{ .Values.service.NodePort }} + selector: + app: spark-cluster + diff --git a/charts/evi-clustering-archiving-2.1.0/templates/serviceaccount.yaml b/charts/evi-clustering-archiving-2.1.0/templates/serviceaccount.yaml new file mode 100644 index 0000000..bd87ab5 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/serviceaccount.yaml @@ -0,0 +1,20 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + namespace: {{ .Values.global.namespace.value }} + name: {{ include "spark-cluster.fullname" . }} + labels: + account: spark-cluster diff --git a/charts/evi-clustering-archiving-2.1.0/templates/tests/test-connection.yaml b/charts/evi-clustering-archiving-2.1.0/templates/tests/test-connection.yaml new file mode 100644 index 0000000..d364002 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/templates/tests/test-connection.yaml @@ -0,0 +1,28 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "spark-cluster.fullname" . }}-test-connection" + labels: + {{- include "spark-cluster.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "spark-cluster.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/evi-clustering-archiving-2.1.0/values.yaml b/charts/evi-clustering-archiving-2.1.0/values.yaml new file mode 100644 index 0000000..b224807 --- /dev/null +++ b/charts/evi-clustering-archiving-2.1.0/values.yaml @@ -0,0 +1,117 @@ +# INTEL CONFIDENTIAL +# +# Copyright (C) 2022 Intel Corporation. +# +# This software and the related documents are Intel copyrighted materials, and your use of +# them is governed by the express license under which they were provided to you (License). +# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, +# disclose or transmit this software or the related documents without Intel's prior written permission. +# +# This software and the related documents are provided as is, with no express or implied warranties, +# other than those that are expressly stated in the License. + +--- +# Default values for search-image-by-image. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: spark + tag: 1.2.2 + type: NodePort + port: 8080 + pullPolicy: IfNotPresent + +istioInjection: true + +service: + port: 8080 + type: NodePort + NodePort: 32088 + +global: + namespace: + create: false + value: spark-cluster + istioInjection: + create: false + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +configMap: + name: "spark-cluster-cm" + sqlDB: + addr: evi-postgresql.smartedge-apps + port: 5432 + hdfs: + addr: "evi-hbase-hadoop-hdfs-nn.smartedge-apps" + port: "9000" + user: "root" + archivePath: "/greenplum/vehicle_archive/" + +podSecurityContext: {} + # fsGroup: 2000 + +volumes: + name: spark-cluster-secret-volume + readOnly: true + mountPath: "/opt/psqlauth" + +secret: + secretName: spark-cluster-secret + # secret.auth (required) Authentication configs for spark-cluster (base64 encoded) + auth: + password: "" + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} +