Skip to content

Commit

Permalink
adding chart its-query-web-3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarerecipes committed Aug 16, 2024
1 parent 71fe99d commit 0914319
Show file tree
Hide file tree
Showing 11 changed files with 516 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/its-query-web-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-web-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-web
type: application
version: 3.0.3
21 changes: 21 additions & 0 deletions charts/its-query-web-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-web.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-web.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "query-web.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-web.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-web-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-web.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-web.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-web.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

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

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

{{/*
Create the name of the service account to use
*/}}
{{- define "query-web.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "query-web.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
67 changes: 67 additions & 0 deletions charts/its-query-web-3.0.3/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# 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: {{ include "query-web.fullname" . }}
namespace: {{ .Values.global.namespace.value }}
labels:
version: v1
annotations:
container.apparmor.security.beta.kubernetes.io/query-web: runtime/default
spec:
replicas: 1
selector:
matchLabels:
app: query-web
version: v1
template:
metadata:
labels:
app: query-web
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 }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.image.port }}
resources:
limits:
cpu: "1"
memory: 200Mi
requests:
cpu: "10m"
memory: 100Mi
securityContext:
allowPrivilegeEscalation: false
95 changes: 95 additions & 0 deletions charts/its-query-web-3.0.3/templates/gateway-web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# 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: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
namespace: {{ .Values.global.namespace.value }}
name: query-web
annotations:
container.apparmor.security.beta.kubernetes.io/query-web: runtime/default
spec:
host: its-query-web
subsets:
- name: v1
labels:
app: query-web
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
namespace: {{ .Values.global.namespace.value }}
name: query-rest
annotations:
container.apparmor.security.beta.kubernetes.io/query-web: runtime/default
spec:
host: its-query-rest
subsets:
- name: v1
labels:
app: query-rest
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
namespace: {{ .Values.global.namespace.value }}
name: query-gateway
annotations:
container.apparmor.security.beta.kubernetes.io/query-web: runtime/default
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
- port:
number: 443
name: https
protocol: HTTPS
hosts:
- "*"
tls: {{- toYaml .Values.gatewayTls | nindent 6 }}
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
namespace: {{ .Values.global.namespace.value }}
name: query
spec:
hosts:
- "*"
gateways:
- query-gateway
http:
- match:
- uri:
prefix: /api
route:
- destination:
host: its-query-rest
port:
number: 8080
- match:
- uri:
prefix: /
route:
- destination:
host: its-query-web
port:
number: 8088
---

54 changes: 54 additions & 0 deletions charts/its-query-web-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-web.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-web.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 }}
28 changes: 28 additions & 0 deletions charts/its-query-web-3.0.3/templates/service.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: Service
metadata:
namespace: {{ .Values.global.namespace.value }}
name: its-query-web
labels:
app: query-web
spec:
ports:
- port: {{ .Values.image.port }}
name: http
protocol: TCP
targetPort: {{ .Values.image.port }}
selector:
app: query-web
21 changes: 21 additions & 0 deletions charts/its-query-web-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-web
labels:
account: query-web

Loading

0 comments on commit 0914319

Please sign in to comment.