Update helm
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: sidata-app
|
||||
description: Helm chart untuk aplikasi Laravel SIDATA
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.0.0"
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: sidata-nginx-config
|
||||
namespace: sidata-prod
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /var/www/html/public;
|
||||
index index.php index.html;
|
||||
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_param HTTP_X_FORWARDED_PROTO https;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_param HTTP_X_FORWARDED_PROTO https;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount | default 1 }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | default "Always" }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.targetPort | default 80 }}
|
||||
volumeMounts:
|
||||
- name: nginx-config-volume
|
||||
mountPath: /etc/nginx/http.d/default.conf
|
||||
subPath: default.conf
|
||||
env:
|
||||
{{- if .Values.env }}
|
||||
{{- range $key, $value := .Values.env }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
# --- KONFIGURASI UTAMA SUB-PATH & REVERSE PROXY LARAVEL ---
|
||||
- name: APP_URL
|
||||
value: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
|
||||
- name: ASSET_URL
|
||||
value: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
|
||||
- name: SESSION_DRIVER
|
||||
value: "file"
|
||||
- name: SESSION_DOMAIN
|
||||
value: ""
|
||||
- name: SESSION_PATH
|
||||
value: "/"
|
||||
- name: SESSION_SECURE_COOKIE
|
||||
value: "false"
|
||||
- name: SESSION_SAME_SITE
|
||||
value: "lax"
|
||||
- name: TRUSTED_PROXIES
|
||||
value: "*"
|
||||
# --- SECRETS ---
|
||||
- name: APP_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-secret
|
||||
key: APP_KEY
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-secret
|
||||
key: DB_PASSWORD
|
||||
- name: ORA_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-secret
|
||||
key: ORA_PASSWORD
|
||||
volumes:
|
||||
- name: nginx-config-volume
|
||||
configMap:
|
||||
name: sidata-nginx-config
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: sidata-ingress
|
||||
namespace: sidata-prod
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.middlewares: sidata-prod-fix-sidata-prefix@kubernetescrd
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: dashboard-bpkd.drc-bpkd.data-center.id
|
||||
http:
|
||||
paths:
|
||||
- path: /sidata
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: sidata-service
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: fix-sidata-prefix
|
||||
namespace: sidata-prod
|
||||
spec:
|
||||
replacePathRegex:
|
||||
regex: "^/sidata/(.*)"
|
||||
replacement: "/$1"
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
APP_KEY: {{ .Values.secrets.APP_KEY | quote }}
|
||||
DB_PASSWORD: {{ .Values.secrets.DB_PASSWORD | quote }}
|
||||
ORA_PASSWORD: {{ .Values.secrets.ORA_PASSWORD | quote }}
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: sidata-service
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 9000
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: sidata
|
||||
@@ -0,0 +1,45 @@
|
||||
replicaCount: 2
|
||||
|
||||
image:
|
||||
repository: 10.15.39.186:8083/eosbpkd/sidata
|
||||
pullPolicy: Always
|
||||
tag: "latest"
|
||||
|
||||
service:
|
||||
type: NodePort
|
||||
port: 80
|
||||
targetPort: 9000
|
||||
nodePort: 32180
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "nginx"
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "64m"
|
||||
hosts:
|
||||
- host: "dashboard-bpkd.drc-bpkd.data-center.id"
|
||||
paths:
|
||||
- path: "/sidata"
|
||||
pathType: "Prefix"
|
||||
|
||||
# Environment Variables Aplikasi
|
||||
env:
|
||||
APP_NAME: "SIDATA"
|
||||
APP_ENV: "production"
|
||||
APP_DEBUG: "false"
|
||||
APP_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
|
||||
ASSET_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
|
||||
FORCE_HTTPS: "true"
|
||||
DB_CONNECTION: "mysql"
|
||||
DB_HOST: "10.15.39.185"
|
||||
DB_PORT: "3306"
|
||||
DB_DATABASE: "sidata"
|
||||
DB_USERNAME: "aplikasi"
|
||||
ORA_HOST: "10.15.39.193"
|
||||
|
||||
# Rahasia Sensitive
|
||||
secrets:
|
||||
APP_KEY: "base64:HiyJqrnWz8zB6WUCXTVb6lZsC3EraX/vFIn66Hx/dVM="
|
||||
DB_PASSWORD: "pusdatin"
|
||||
ORA_PASSWORD: "123456"
|
||||
Reference in New Issue
Block a user