Documentation

Please go through the following file before you attempt deployment. There are some few key changes that need to be made before deployment is initiated. Below is code snippet for the `values.yaml` file

values.yaml
1# Default values that will be used by your project.
2# This is a YAML-formatted file.
3
4# Declare variables to be passed into your templates.
5configMap:
6 env: # All Non-Sensitive environment variables
7 db_ssl_mode: require
8 base_url: http://localhost:8080
9
10# Please DON'T change this
11secrets:
12 existingSecret: "app-secrets"
13
14replicaCount: <number of replicas>
15
16image:
17 repository: 975050342805.dkr.ecr.us-east-1.amazonaws.com/<project-name>
18 pullPolicy: Always
19 # Overrides the image tag whose default is the chart appVersion.
20 tag: "latest" # Recommended not to use latest
21
22#DON'T change imagePullSecrets
23imagePullSecrets: []
24 # - name: regcred
25
26nameOverride: ""
27fullnameOverride: ""
28
29serviceAccount:
30 # Specifies whether a service account should be created
31 create: true
32 # Automatically mount a ServiceAccount's API credentials?
33 automount: true
34 # Annotations to add to the service account
35 annotations: {}
36 # The name of the service account to use.
37 # If not set and create is true, a name is generated using the fullname template
38 name: ""
39
40podAnnotations: {}
41podLabels: {}
42
43podSecurityContext: {}
44 # fsGroup: 2000
45
46securityContext: {}
47 # capabilities:
48 # drop:
49 # - ALL
50 # readOnlyRootFilesystem: true
51 # runAsNonRoot: true
52 # runAsUser: 1000
53
54service:
55 type: ClusterIP
56 port: 80
57 targetPort: 8080 # Container Port
58
59ingress:
60 enabled: true
61 className: "nginx"
62 annotations:
63 kubernetes.io/ingress.class: nginx
64 cert-manager.io/cluster-issuer: "letsencrypt-staging" # Please USE Staging when in dev mode. ONLY use prod when in prod
65 nginx.ingress.kubernetes.io/enable-cors: "true"
66 nginx.ingress.kubernetes.io/cors-allow-origin: "*" # Adjust this in prod
67 hosts:
68 - host: app.<project_name>.maosproject.co
69 paths:
70 - path: /
71 pathType: ImplementationSpecific
72 tls:
73 - secretName: app-secrets
74 hosts:
75 - app.<project_name>.maosproject.co
76
77resources:
78 limits:
79 cpu: 250m
80 memory: 1Gi
81 requests:
82 cpu: 150m
83 memory: 512Mi
84
85livenessProbe:
86 httpGet:
87 path: /api/v1/health # Your Application MUST have a Healthcheck Endpoint
88 port: 8080 # Container Port
89 initialDelaySeconds: 15
90 periodSeconds: 15
91 timeoutSeconds: 20
92 failureThreshold: 5
93readinessProbe:
94 httpGet:
95 path: /api/v1/health # Your Application MUST have a Healthcheck Endpoint
96 port: 8080 # Container Port
97 initialDelaySeconds: 20
98 periodSeconds: 15
99 timeoutSeconds: 20
100 failureThreshold: 5
101
102autoscaling:
103 enabled: false
104 minReplicas: 1
105 maxReplicas: 3
106 targetCPUUtilizationPercentage: 80
107 # targetMemoryUtilizationPercentage: 80
108
109
110# Additional volumes on the output Deployment definition.
111volumes: []
112# - name: foo
113# secret:
114# secretName: mysecret
115# optional: false
116
117# Additional volumeMounts on the output Deployment definition.
118volumeMounts: []
119# - name: foo
120# mountPath: "/etc/foo"
121# readOnly: true
122
123nodeSelector: {}
124
125tolerations: []
126
127affinity: {}

Blocks Explanation

Secrets are provided on the dashboard while setting up your project. They are encrypted and stored in AWS secret store and your app references them via the following block. That's why this block SHOULD NOT be edited.

values.yaml
1secrets:
2 existingSecret: "app-secrets"

In your deployment template file, secrets are referenced as shown below

<chartName>/templates/deployment.yaml
1envFrom:
2 - secretRef:
3 name: {{ .Values.secrets.existingSecret }}