-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a26124
commit 3ee642e
Showing
11 changed files
with
481 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
28
charts/its-query-rest-3.0.3/templates/tests/test-connection.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.