-
Notifications
You must be signed in to change notification settings - Fork 370
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
4e4ea14
commit 67b898c
Showing
7 changed files
with
212 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,5 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: A Helm chart for Kubernetes | ||
name: sakhi | ||
version: 0.1.0 |
14 changes: 14 additions & 0 deletions
14
kubernetes/helm_charts/VABots/sakhi/templates/configmap.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,14 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Chart.Name }}-config | ||
data: | ||
GOOGLE_APPLICATION_CREDENTIALS: "{{ .Values.ks_gcp_credential_json_path }}" | ||
BUCKET_NAME: "{{ .Values.ks_gcp_bucket_name }}" | ||
DATABASE_NAME: "{{ .Values.ks_postgress_db_name }}" | ||
DATABASE_USERNAME: "{{ .Values.ks_postgres_db_username }}" | ||
DATABASE_PASSWORD: "{{ .Values.ks_postgres_db_password }}" | ||
DATABASE_IP: "{{ .Values.ks_postgres_db_host }}" | ||
DATABASE_PORT: "{{ .Values.ks_postgres_db_port }}" | ||
OPENAI_API_KEY: "{{ .Values.ks_open_api_key }}" | ||
|
7 changes: 7 additions & 0 deletions
7
kubernetes/helm_charts/VABots/sakhi/templates/configmap_wrapper.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,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Chart.Name }}-wrapper-config | ||
data: | ||
botName: {{ .Values.botName }} | ||
token: {{ .Values.token }} |
60 changes: 60 additions & 0 deletions
60
kubernetes/helm_charts/VABots/sakhi/templates/deployment.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,60 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
namespace: {{ .Values.namespace }} | ||
annotations: | ||
reloader.stakater.com/auto: "true" | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: {{ .Values.strategy.maxsurge }} | ||
maxUnavailable: {{ .Values.strategy.maxunavailable }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Chart.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Chart.Name }} | ||
spec: | ||
{{- if .Values.imagepullsecrets }} | ||
imagePullSecrets: | ||
- name: {{ .Values.imagepullsecrets }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" | ||
imagePullPolicy: Always | ||
envFrom: | ||
- configMapRef: | ||
name: {{ .Chart.Name }}-config | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
ports: | ||
- containerPort: {{ .Values.network.port }} | ||
# {{- if .Values.healthcheck }} | ||
# livenessProbe: | ||
#{{ toYaml .Values.livenessProbe | indent 10 }} | ||
readinessProbe: | ||
#{{ toYaml .Values.readinessProbe | indent 10 }} | ||
#{{- end }} | ||
|
||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Chart.Name }}-service | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: {{ .Chart.Name }} | ||
spec: | ||
ports: | ||
- name: http-{{ .Chart.Name }} | ||
protocol: TCP | ||
port: {{ .Values.network.targetport }} | ||
selector: | ||
app: {{ .Chart.Name }} |
60 changes: 60 additions & 0 deletions
60
kubernetes/helm_charts/VABots/sakhi/templates/deployment_wrapper.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,60 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Chart.Name }}-wrapper | ||
namespace: {{ .Values.namespace }} | ||
annotations: | ||
reloader.stakater.com/auto: "true" | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: {{ .Values.strategy.maxsurge }} | ||
maxUnavailable: {{ .Values.strategy.maxunavailable }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Chart.Name }}-wrapper | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Chart.Name }}-wrapper | ||
spec: | ||
{{- if .Values.imagepullsecrets }} | ||
imagePullSecrets: | ||
- name: {{ .Values.imagepullsecrets }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }}-wrapper | ||
image: "{{ .Values.dockerhub }}/{{ .Values.repository_telegram }}:{{ .Values.image_tag }}" | ||
imagePullPolicy: Always | ||
envFrom: | ||
- configMapRef: | ||
name: {{ .Chart.Name }}-wrapper-config | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
ports: | ||
- containerPort: {{ .Values.network_wrapper.port }} | ||
# {{- if .Values.healthcheck }} | ||
# livenessProbe: | ||
#{{ toYaml .Values.livenessProbe | indent 10 }} | ||
readinessProbe: | ||
#{{ toYaml .Values.readinessProbe | indent 10 }} | ||
#{{- end }} | ||
|
||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Chart.Name }}-wrapper-service | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: {{ .Chart.Name }}-wrapper | ||
spec: | ||
ports: | ||
- name: http-{{ .Chart.Name }} | ||
protocol: TCP | ||
port: {{ .Values.network_wrapper.targetport }} | ||
selector: | ||
app: {{ .Chart.Name }}-wrapper |
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,31 @@ | ||
{{- if .Values.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ .Chart.Name }} | ||
minReplicas: {{ .Values.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.autoscaling.maxReplicas }} | ||
metrics: | ||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
{{- end }} | ||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
{{- 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,35 @@ | ||
### Default variable file for kathaasaagra-service ### | ||
|
||
namespace: "" | ||
imagepullsecrets: "" | ||
dockerhub: "" | ||
|
||
replicaCount: 1 | ||
repository: "" | ||
image_tag: "" | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
limits: | ||
cpu: 1 | ||
memory: 1024Mi | ||
network: | ||
port: 8000 | ||
targetport: 8000 | ||
network_wrapper: | ||
port: 7000 | ||
targetport: 7000 | ||
strategy: | ||
type: RollingUpdate | ||
maxsurge: 25 | ||
maxunavailable: 25 | ||
|
||
#{{ kathaasaagra_liveness_readiness | to_nice_yaml }} | ||
|
||
autoscaling: | ||
enabled: false | ||
minReplicas: 1 | ||
maxReplicas: 2 | ||
targetCPUUtilizationPercentage: 60 | ||
targetMemoryUtilizationPercentage: |