Skip to content

Commit

Permalink
adding chart its-query-rest-3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarerecipes committed Aug 16, 2024
1 parent 5a26124 commit 3ee642e
Show file tree
Hide file tree
Showing 11 changed files with 481 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/its-query-rest-3.0.3/.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/its-query-rest-3.0.3/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: its-query-rest
type: application
version: 3.0.3
21 changes: 21 additions & 0 deletions charts/its-query-rest-3.0.3/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "query-rest.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "query-rest.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "query-rest.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "query-rest.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
{{- end }}
76 changes: 76 additions & 0 deletions charts/its-query-rest-3.0.3/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 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.

---
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "query-rest.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 "query-rest.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 "query-rest.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "query-rest.labels" -}}
helm.sh/chart: {{ include "query-rest.chart" . }}
{{ include "query-rest.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{/*
Selector labels
*/}}
{{- define "query-rest.selectorLabels" -}}
app.kubernetes.io/name: {{ include "query-rest.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "query-rest.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "query-rest.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
85 changes: 85 additions & 0 deletions charts/its-query-rest-3.0.3/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# 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: its-query-rest
namespace: {{ .Values.global.namespace.value }}
labels:
version: v1
annotations:
container.apparmor.security.beta.kubernetes.io/query-rest: runtime/default
spec:
replicas: 1
selector:
matchLabels:
app: query-rest
version: v1
template:
metadata:
labels:
app: query-rest
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: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.Version }}"
args: ["--minio.endpoint=https://{{ .Values.minio.endpoint }}:{{ .Values.minio.port }}","--minio.rootUser=${SECRET_USRNAME}","--minio.rootPassword=${SECRET_PASSWORD}",
"--searchImage.addr=http://{{ .Values.searchImage.addr }}:{{ .Values.searchImage.port }}",
"--storageRest.addr=http://{{ .Values.storageRest.addr }}:{{ .Values.storageRest.port }}",
"--taskManager.addr=http://{{ .Values.taskManager.addr }}:{{ .Values.taskManager.port }}"
]
env:
- name: SECRET_USRNAME
valueFrom:
secretKeyRef:
name: query-rest-minio-secret
key: rootUser
optional: false
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: query-rest-minio-secret
key: rootPassword
optional: false
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.image.port }}
resources:
limits:
cpu: "4"
memory: 400Mi
requests:
cpu: "10m"
memory: 200Mi
securityContext:
allowPrivilegeEscalation: false
54 changes: 54 additions & 0 deletions charts/its-query-rest-3.0.3/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 "query-rest.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- 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 "query-rest.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- 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: {{ . }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
24 changes: 24 additions & 0 deletions charts/its-query-rest-3.0.3/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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: query-rest-minio-secret
namespace: {{ .Values.global.namespace.value }}
labels:
app: query-rest
type: Opaque
data:
rootUser: {{ .Values.minio.rootUser }}
rootPassword: {{ .Values.minio.rootPassword }}
30 changes: 30 additions & 0 deletions charts/its-query-rest-3.0.3/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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: {{ include "query-rest.fullname" . }}
labels:
app: query-rest
spec:
type: NodePort
ports:
- port: {{ .Values.image.port }}
name: http
protocol: TCP
targetPort: {{ .Values.image.port }}
nodePort: {{ .Values.node.port }}
selector:
app: query-rest
21 changes: 21 additions & 0 deletions charts/its-query-rest-3.0.3/templates/serviceaccount.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: ServiceAccount
metadata:
namespace: {{ .Values.global.namespace.value }}
name: its-query-rest
labels:
account: query-rest

28 changes: 28 additions & 0 deletions charts/its-query-rest-3.0.3/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -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 "query-rest.fullname" . }}-test-connection"
labels:
{{- include "query-rest.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "query-rest.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
Loading

0 comments on commit 3ee642e

Please sign in to comment.