This commit is contained in:
23
shuffle/functions/extensions/k8s/shuffle/.helmignore
Normal file
23
shuffle/functions/extensions/k8s/shuffle/.helmignore
Normal file
@ -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/
|
24
shuffle/functions/extensions/k8s/shuffle/Chart.yaml
Normal file
24
shuffle/functions/extensions/k8s/shuffle/Chart.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: shuffle
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.16.0"
|
22
shuffle/functions/extensions/k8s/shuffle/templates/NOTES.txt
Normal file
22
shuffle/functions/extensions/k8s/shuffle/templates/NOTES.txt
Normal file
@ -0,0 +1,22 @@
|
||||
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 }}{{ .path }}
|
||||
{{- 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 "shuffle.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 "shuffle.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "shuffle.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 "shuffle.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||
{{- end }}
|
@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "shuffle.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 "shuffle.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 "shuffle.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "shuffle.labels" -}}
|
||||
helm.sh/chart: {{ include "shuffle.chart" . }}
|
||||
{{ include "shuffle.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "shuffle.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "shuffle.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "shuffle.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "shuffle.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -0,0 +1,253 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.name }}frontend
|
||||
namespace: {{ .Values.namespace | quote }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
service: shuffle
|
||||
app: shuffle-frontend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
service: shuffle
|
||||
app: shuffle-frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: shuffle-frontend
|
||||
image: ghcr.io/frikky/shuffle-frontend:nightly
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: BACKEND_HOSTNAME
|
||||
value: backend-service
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
hostPort: 3001
|
||||
- name: https
|
||||
containerPort: 443
|
||||
hostname: shuffle-frontend
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.name }}backend
|
||||
namespace: {{ .Values.namespace | quote }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
service: shuffle
|
||||
app: shuffle-backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
service: shuffle
|
||||
app: shuffle-backend
|
||||
spec:
|
||||
containers:
|
||||
- name: shuffle-backend
|
||||
image: ghcr.io/frikky/shuffle-backend:nightly
|
||||
env:
|
||||
- name: BACKEND_HOSTNAME
|
||||
value: "backend-service"
|
||||
- name: BACKEND_PORT
|
||||
value: "5001"
|
||||
- name: ENVIRONMENT_NAME
|
||||
value: "Shuffle"
|
||||
- name: HTTPS_PROXY
|
||||
- name: HTTP_PROXY
|
||||
- name: ORG_ID
|
||||
value: "Shuffle"
|
||||
- name: OUTER_HOSTNAME
|
||||
value: "backend-service"
|
||||
- name: SHUFFLE_APP_FORCE_UPDATE
|
||||
value: "false"
|
||||
- name: SHUFFLE_APP_HOTLOAD_FOLDER
|
||||
value: "/shuffle-apps"
|
||||
- name: SHUFFLE_APP_HOTLOAD_LOCATION
|
||||
value: "/shuffle-apps"
|
||||
- name: SHUFFLE_CONTAINER_AUTO_CLEANUP
|
||||
value: "false"
|
||||
- name: SHUFFLE_DEFAULT_APIKEY
|
||||
- name: SHUFFLE_DEFAULT_PASSWORD
|
||||
- name: SHUFFLE_DEFAULT_USERNAME
|
||||
- name: SHUFFLE_DOWNLOAD_AUTH_BRANCH
|
||||
- name: SHUFFLE_DOWNLOAD_AUTH_PASSWORD
|
||||
- name: SHUFFLE_DOWNLOAD_AUTH_USERNAME
|
||||
- name: SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH
|
||||
- name: SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION
|
||||
- name: SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD
|
||||
- name: SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME
|
||||
- name: SHUFFLE_ELASTIC
|
||||
value: "true"
|
||||
- name: SHUFFLE_OPENSEARCH_APIKEY
|
||||
- name: SHUFFLE_OPENSEARCH_CERTIFICATE_FILE
|
||||
- name: SHUFFLE_OPENSEARCH_CLOUDID
|
||||
- name: SHUFFLE_OPENSEARCH_PASSWORD
|
||||
- name: SHUFFLE_OPENSEARCH_PROXY
|
||||
- name: SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY
|
||||
value: "true"
|
||||
- name: SHUFFLE_OPENSEARCH_URL
|
||||
value: http://opensearch-service:9200
|
||||
- name: SHUFFLE_OPENSEARCH_USERNAME
|
||||
value: ""
|
||||
- name: SHUFFLE_PASS_APP_PROXY
|
||||
value: "FALSE"
|
||||
- name: SHUFFLE_PASS_WORKER_PROXY
|
||||
value: "FALSE"
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/docker.sock
|
||||
name: docker-sock
|
||||
- mountPath: /shuffle-apps
|
||||
name: shuffle-app-hotload-location
|
||||
- mountPath: /shuffle-files
|
||||
name: shuffle-file-location
|
||||
hostname: shuffle-backend
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
- name: shuffle-app-hotload-location
|
||||
hostPath:
|
||||
path: /data/kubernetes/shuffle-apps
|
||||
type: DirectoryOrCreate
|
||||
- name: shuffle-file-location
|
||||
hostPath:
|
||||
path: /data/kubernetes/shuffle-files
|
||||
type: DirectoryOrCreate
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.name }}orborus
|
||||
namespace: {{ .Values.namespace | quote }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
service: shuffle
|
||||
app: shuffle-orborus
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
service: shuffle
|
||||
app: shuffle-orborus
|
||||
spec:
|
||||
containers:
|
||||
- name: shuffle-orborus
|
||||
image: ghcr.io/frikky/shuffle-orborus:nightly
|
||||
env:
|
||||
- name: RUNNING_MODE
|
||||
value: kubernetes
|
||||
- name: BASE_URL
|
||||
value: http://backend-service:5001
|
||||
- name: CLEANUP
|
||||
value: "false"
|
||||
- name: DOCKER_API_VERSION
|
||||
value: "1.40"
|
||||
- name: ENVIRONMENT_NAME
|
||||
value: Shuffle
|
||||
- name: HTTPS_PROXY
|
||||
- name: HTTP_PROXY
|
||||
- name: ORG_ID
|
||||
value: Shuffle
|
||||
- name: SHUFFLE_APP_SDK_VERSION
|
||||
value: 0.8.97
|
||||
- name: SHUFFLE_BASE_IMAGE_NAME
|
||||
value: frikky
|
||||
- name: SHUFFLE_BASE_IMAGE_REGISTRY
|
||||
value: ghcr.io
|
||||
- name: SHUFFLE_BASE_IMAGE_TAG_SUFFIX
|
||||
value: "-0.8.80"
|
||||
- name: SHUFFLE_ORBORUS_EXECUTION_TIMEOUT
|
||||
value: "600"
|
||||
- name: SHUFFLE_ORBORUS_EXECUTION_CONCURRENCY
|
||||
value: "50"
|
||||
- name: SHUFFLE_PASS_WORKER_PROXY
|
||||
value: "TRUE"
|
||||
- name: SHUFFLE_WORKER_VERSION
|
||||
value: nightly
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/docker.sock
|
||||
name: docker-sock
|
||||
hostname: shuffle-orborus
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
#---
|
||||
#apiVersion: apps/v1
|
||||
#kind: Deployment
|
||||
#metadata:
|
||||
# name: {{ .Values.name }}opensearch
|
||||
# namespace: {{ .Values.namespace | quote }}
|
||||
#spec:
|
||||
# replicas: 1
|
||||
# selector:
|
||||
# matchLabels:
|
||||
# service: shuffle
|
||||
# app: shuffle-opensearch
|
||||
# template:
|
||||
# metadata:
|
||||
# labels:
|
||||
# service: shuffle
|
||||
# app: shuffle-opensearch
|
||||
# spec:
|
||||
# nodeSelector:
|
||||
# node.bdlab-venus.com/opensearch: available
|
||||
# initContainers:
|
||||
# - name: permissions-fix
|
||||
# image: frikky/busybox
|
||||
# #volumeMounts:
|
||||
# # - name: opensearch-claim0
|
||||
# # mountPath: /usr/share/elasticsearch/data
|
||||
# command: [ 'chown' ]
|
||||
# args: [ '1000:1000', '/usr/share/elasticsearch/data' ]
|
||||
# containers:
|
||||
# - name: shuffle-opensearch
|
||||
# image: opensearchproject/opensearch:1.0.1
|
||||
# env:
|
||||
# - name: TZ
|
||||
# value: Asia/Shanghai
|
||||
# - name: bootstrap.memory_lock
|
||||
# value: "false"
|
||||
# - name: OPENSEARCH_JAVA_OPTS
|
||||
# value: "-Xms1024m -Xmx1024m"
|
||||
# - name: opendistro_security.disabled
|
||||
# value: "true"
|
||||
# - name: cluster.routing.allocation.disk.threshold_enabled
|
||||
# value: "false"
|
||||
# - name: cluster.name
|
||||
# value: shuffle-cluster
|
||||
# - name: node.name
|
||||
# value: opensearch-service
|
||||
# - name: discovery.seed_hosts
|
||||
# value: opensearch-service
|
||||
# - name: cluster.initial_master_nodes
|
||||
# value: opensearch-service
|
||||
# volumeMounts:
|
||||
# - mountPath: /usr/share/opensearch/data
|
||||
# name: opensearch-claim0
|
||||
#volumes:
|
||||
# - name: opensearch-claim0
|
||||
# persistentVolumeClaim:
|
||||
# claimName: opensearch-claim0
|
||||
# volumeMounts:
|
||||
# - mountPath: /usr/share/opensearch/data
|
||||
# readOnly: true
|
||||
# name: db-location
|
||||
# volumes:
|
||||
# - name: db-location
|
||||
# hostPath:
|
||||
# path: /data/kubernetes/shuffle-opensearch
|
||||
# type: DirectoryOrCreate
|
28
shuffle/functions/extensions/k8s/shuffle/templates/hpa.yaml
Normal file
28
shuffle/functions/extensions/k8s/shuffle/templates/hpa.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "shuffle.fullname" . }}
|
||||
labels:
|
||||
{{- include "shuffle.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "shuffle.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -0,0 +1,61 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "shuffle.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 "shuffle.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 }}
|
@ -0,0 +1,24 @@
|
||||
#apiVersion: v1
|
||||
#kind: PersistentVolume
|
||||
#metadata:
|
||||
# name: opensearch-claim0
|
||||
# labels:
|
||||
# app: opensearch-claim0
|
||||
#spec:
|
||||
# capacity:
|
||||
# storage: "10G"
|
||||
# volumeMode: Filesystem
|
||||
# persistentVolumeReclaimPolicy: Retain
|
||||
# storageClassName: local-storage
|
||||
# accessModes:
|
||||
# - "ReadWriteOnce"
|
||||
# local:
|
||||
# path: "/data/kubernetes/shuffle-opensearch"
|
||||
# nodeAffinity:
|
||||
# required:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: node.dollar.com/opensearch
|
||||
# operator: In
|
||||
# values:
|
||||
# - available
|
@ -0,0 +1,17 @@
|
||||
#apiVersion: v1
|
||||
#kind: PersistentVolumeClaim
|
||||
#metadata:
|
||||
# name: opensearch-claim0
|
||||
# namespace: {{ .Values.namespace }}
|
||||
# labels:
|
||||
# app: opensearch-claim0
|
||||
#spec:
|
||||
# selector:
|
||||
# matchLabels:
|
||||
# app: opensearch-claim0
|
||||
# accessModes:
|
||||
# - ReadWriteOnce
|
||||
# storageClassName: local-storage
|
||||
# resources:
|
||||
# requests:
|
||||
# storage: 5Gi
|
@ -0,0 +1,52 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: backend-service
|
||||
namespace: {{ .Values.namespace | quote }}
|
||||
spec:
|
||||
ports:
|
||||
- name: "5001"
|
||||
port: 5001
|
||||
targetPort: 5001
|
||||
selector:
|
||||
app: shuffle-backend
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend-service
|
||||
namespace: {{ .Values.namespace | quote }}
|
||||
spec:
|
||||
type: NodePort
|
||||
externalTrafficPolicy: Local
|
||||
ports:
|
||||
- name: "3001"
|
||||
port: 3001
|
||||
nodePort: 3001
|
||||
targetPort: 80
|
||||
- name: "3443"
|
||||
port: 3443
|
||||
nodePort: 3443
|
||||
targetPort: 443
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: shuffle-frontend
|
||||
|
||||
#---
|
||||
#apiVersion: v1
|
||||
#kind: Service
|
||||
#metadata:
|
||||
# name: opensearch-service
|
||||
# namespace: {{ .Values.namespace | quote }}
|
||||
#spec:
|
||||
# type: NodePort
|
||||
# externalTrafficPolicy: Local
|
||||
# ports:
|
||||
# - name: "9200"
|
||||
# port: 9200
|
||||
# targetPort: 9200
|
||||
# nodePort: 9200
|
||||
# protocol: TCP
|
||||
# selector:
|
||||
# app: shuffle-opensearch
|
@ -0,0 +1,12 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "shuffle.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "shuffle.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "shuffle.fullname" . }}-test-connection"
|
||||
labels:
|
||||
{{- include "shuffle.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['{{ include "shuffle.fullname" . }}:{{ .Values.service.port }}']
|
||||
restartPolicy: Never
|
82
shuffle/functions/extensions/k8s/shuffle/values.yaml
Normal file
82
shuffle/functions/extensions/k8s/shuffle/values.yaml
Normal file
@ -0,0 +1,82 @@
|
||||
# Default values for shuffle.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: nginx
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
|
||||
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: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
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
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
Reference in New Issue
Block a user