diff --git a/charts/its-query-rest-3.0.3/.helmignore b/charts/its-query-rest-3.0.3/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/its-query-rest-3.0.3/.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/its-query-rest-3.0.3/Chart.yaml b/charts/its-query-rest-3.0.3/Chart.yaml new file mode 100644 index 0000000..6949992 --- /dev/null +++ b/charts/its-query-rest-3.0.3/Chart.yaml @@ -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 diff --git a/charts/its-query-rest-3.0.3/templates/NOTES.txt b/charts/its-query-rest-3.0.3/templates/NOTES.txt new file mode 100644 index 0000000..29a2fe1 --- /dev/null +++ b/charts/its-query-rest-3.0.3/templates/NOTES.txt @@ -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 }} diff --git a/charts/its-query-rest-3.0.3/templates/_helpers.tpl b/charts/its-query-rest-3.0.3/templates/_helpers.tpl new file mode 100644 index 0000000..e3575b4 --- /dev/null +++ b/charts/its-query-rest-3.0.3/templates/_helpers.tpl @@ -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 -}} diff --git a/charts/its-query-rest-3.0.3/templates/deployment.yaml b/charts/its-query-rest-3.0.3/templates/deployment.yaml new file mode 100644 index 0000000..b2decef --- /dev/null +++ b/charts/its-query-rest-3.0.3/templates/deployment.yaml @@ -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 diff --git a/charts/its-query-rest-3.0.3/templates/ingress.yaml b/charts/its-query-rest-3.0.3/templates/ingress.yaml new file mode 100644 index 0000000..3236ff6 --- /dev/null +++ b/charts/its-query-rest-3.0.3/templates/ingress.yaml @@ -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 }} diff --git a/charts/its-query-rest-3.0.3/templates/secret.yaml b/charts/its-query-rest-3.0.3/templates/secret.yaml new file mode 100644 index 0000000..1612cb1 --- /dev/null +++ b/charts/its-query-rest-3.0.3/templates/secret.yaml @@ -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 }} diff --git a/charts/its-query-rest-3.0.3/templates/service.yaml b/charts/its-query-rest-3.0.3/templates/service.yaml new file mode 100644 index 0000000..f2351f2 --- /dev/null +++ b/charts/its-query-rest-3.0.3/templates/service.yaml @@ -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 diff --git a/charts/its-query-rest-3.0.3/templates/serviceaccount.yaml b/charts/its-query-rest-3.0.3/templates/serviceaccount.yaml new file mode 100644 index 0000000..9344a39 --- /dev/null +++ b/charts/its-query-rest-3.0.3/templates/serviceaccount.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: ServiceAccount +metadata: + namespace: {{ .Values.global.namespace.value }} + name: its-query-rest + labels: + account: query-rest + diff --git a/charts/its-query-rest-3.0.3/templates/tests/test-connection.yaml b/charts/its-query-rest-3.0.3/templates/tests/test-connection.yaml new file mode 100644 index 0000000..71a11bd --- /dev/null +++ b/charts/its-query-rest-3.0.3/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 "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 diff --git a/charts/its-query-rest-3.0.3/values.yaml b/charts/its-query-rest-3.0.3/values.yaml new file mode 100644 index 0000000..35f8eb8 --- /dev/null +++ b/charts/its-query-rest-3.0.3/values.yaml @@ -0,0 +1,113 @@ +# 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 query-rest. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: query-rest + Version: ER-RC-afacca0a9c33605bc53e0fb7ba428c64033ffc72 + port: 8080 + pullPolicy: IfNotPresent + +istioInjection: true + +global: + namespace: + create: false + value: query + istioInjection: + create: false + +minio: + endpoint: "" + port: 30007 + rootUser: "" + rootPassword: "" + +searchImage: + addr: "" + port: 8080 + +storageRest: + addr: "" + port: 9900 + +taskManager: + addr: "" + port: 9900 + +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: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 8088 + +node: + port: 31007 + +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: {}