-
Notifications
You must be signed in to change notification settings - Fork 39
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
abb3301
commit 2579ec6
Showing
4 changed files
with
144 additions
and
10 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.x' | ||
go-version: '1.22.5' | ||
|
||
- name: Set up ko | ||
uses: ko-build/[email protected] | ||
|
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
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
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,134 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: my-app | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: my-app | ||
template: | ||
metadata: | ||
labels: | ||
app: my-app | ||
spec: | ||
containers: | ||
- name: my-app | ||
image: saiyam911/kubesimplify-demo:{{ image_deploy_tag }} | ||
imagePullPolicy: Always | ||
env: | ||
- name: DB_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgresql-credentials | ||
key: username | ||
- name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgresql-credentials | ||
key: password | ||
- name: DB_HOST | ||
value: my-postgresql-rw.default.svc.cluster.local | ||
- name: DB_PORT | ||
value: "5432" | ||
- name: DB_NAME | ||
value: goals_database | ||
ports: | ||
- containerPort: 8080 | ||
readinessProbe: | ||
httpGet: | ||
path: /health | ||
port: 8080 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: 8080 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
resources: | ||
requests: | ||
memory: "350Mi" | ||
cpu: "250m" | ||
limits: | ||
memory: "500Mi" | ||
cpu: "500m" | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: my-app-service | ||
spec: | ||
selector: | ||
app: my-app | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 8080 | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: production-app | ||
spec: | ||
acme: | ||
# The ACME server URL | ||
server: https://acme-v02.api.letsencrypt.org/directory | ||
# Email address used for ACME registration | ||
email: [email protected] | ||
# Name of a secret used to store the ACME account private key | ||
privateKeySecretRef: | ||
name: app | ||
# Enable the HTTP-01 challenge provider | ||
solvers: | ||
- http01: | ||
ingress: | ||
class: nginx | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: app | ||
spec: | ||
secretName: app | ||
issuerRef: | ||
name: production-app | ||
kind: ClusterIssuer | ||
commonName: demo.kubesimplify.com | ||
dnsNames: | ||
- demo.kubesimplify.com | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: my-app-ingress | ||
annotations: | ||
cert-manager.io/cluster-issuer: production-app | ||
|
||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- host: demo.kubesimplify.com | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: my-app-service | ||
port: | ||
number: 80 | ||
tls: | ||
- hosts: | ||
- demo.kubesimplify.com | ||
secretName: app | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: postgresql-credentials | ||
type: Opaque | ||
data: | ||
password: bmV3X3Bhc3N3b3Jk | ||
username: Z29hbHNfdXNlcg== |