Skip to content

Commit

Permalink
adding chart evi-clustering-archiving-2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarerecipes committed Mar 5, 2024
1 parent 074e57e commit 8d38216
Show file tree
Hide file tree
Showing 12 changed files with 542 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
6 changes: 6 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
75 changes: 75 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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 }}
27 changes: 27 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
83 changes: 83 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
74 changes: 74 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
39 changes: 39 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/templates/rola.yaml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
29 changes: 29 additions & 0 deletions charts/evi-clustering-archiving-2.1.0/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -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

Loading

0 comments on commit 8d38216

Please sign in to comment.