commit 39b11cd13f6dec521f7d330f8cb47ef326d960fe Author: ryan Date: Wed Aug 12 13:04:57 2026 +0700 update to git diff --git a/certificate.yaml b/certificate.yaml new file mode 100644 index 0000000..7193d53 --- /dev/null +++ b/certificate.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: web-socket-qris-rssa-id +spec: + secretName: web-socket-qris-rssa-id-tls + issuerRef: + name: letsencrypt-production + kind: ClusterIssuer + commonName: "web-socket-qris.dev.rssa.id" + dnsNames: + - "web-socket-qris.dev.rssa.id" \ No newline at end of file diff --git a/deployment-probes.yaml b/deployment-probes.yaml new file mode 100644 index 0000000..3615991 --- /dev/null +++ b/deployment-probes.yaml @@ -0,0 +1,39 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: web-socket-qris +spec: + template: + spec: + containers: + - name: web-socket-qris + readinessProbe: + failureThreshold: 3 + successThreshold: 1 + initialDelaySeconds: 10 + timeoutSeconds: 1 + periodSeconds: 10 + httpGet: + scheme: HTTP + port: 8080 + path: /api/sistem/health + livenessProbe: + failureThreshold: 3 + successThreshold: 1 + initialDelaySeconds: 60 + timeoutSeconds: 1 + periodSeconds: 60 + httpGet: + scheme: HTTP + port: 8080 + path: /api/sistem/health + startupProbe: + failureThreshold: 6 + successThreshold: 1 + initialDelaySeconds: 0 + timeoutSeconds: 1 + periodSeconds: 10 + httpGet: + scheme: HTTP + port: 8080 + path: /api/sistem/health \ No newline at end of file diff --git a/deployment-resources.yaml b/deployment-resources.yaml new file mode 100644 index 0000000..394f605 --- /dev/null +++ b/deployment-resources.yaml @@ -0,0 +1,17 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: web-socket-qris +spec: + # replicas: 1 + template: + spec: + containers: + - name: web-socket-qris + resources: + limits: + cpu: 400m + memory: 300Mi + requests: + cpu: 100m + memory: 200Mi diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..23b7c13 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: web-socket-qris + labels: + app: web-socket-qris +spec: + selector: + matchLabels: + app: web-socket-qris + template: + metadata: + labels: + app: web-socket-qris + spec: + containers: + - name: web-socket-qris + image: git.rssa.top/rachmadiyanti.annisa.3004/websocket-qris:20251212110938-main + imagePullPolicy: Always + ports: + - containerPort: 8080 \ No newline at end of file diff --git a/hpa.yaml b/hpa.yaml new file mode 100644 index 0000000..4edfa48 --- /dev/null +++ b/hpa.yaml @@ -0,0 +1,12 @@ +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: web-socket-qris +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: web-socket-qris + minReplicas: 1 + maxReplicas: 1 + targetCPUUtilizationPercentage: 70 \ No newline at end of file diff --git a/ingress-route.yaml b/ingress-route.yaml new file mode 100644 index 0000000..c07551c --- /dev/null +++ b/ingress-route.yaml @@ -0,0 +1,19 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: web-socket-qris + annotations: + kubernetes.io/ingress.class: traefik-external +spec: + entryPoints: + - websecure + routes: + - kind: Rule + match: Host(`web-socket-qris.rssa.id`) + middlewares: + - name: default-headers + services: + - name: web-socket-qris + port: 80 + tls: + secretName: web-socket-qris.dev.rssa.id diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..99ad8f4 --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,18 @@ +# kustomization.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- deployment.yaml +- service.yaml +- ingress-route.yaml +- certificate.yaml +- hpa.yaml + +patches: +- path: deployment-resources.yaml +- path: deployment-probes.yaml + +namespace: rssa-apps-prod-new +commonLabels: + app: web-socket-qris \ No newline at end of file diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..2a54596 --- /dev/null +++ b/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: web-socket-qris +spec: + selector: + app: web-socket-qris + ports: + - name: http + port: 80 + targetPort: 8080 \ No newline at end of file