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.34# Declare variables to be passed into your templates.5configMap:6 env: # All Non-Sensitive environment variables7 db_ssl_mode: require8 base_url: http://localhost:8080910# Please DON'T change this11secrets:12 existingSecret: "app-secrets"1314replicaCount: <number of replicas>1516image:17 repository: 975050342805.dkr.ecr.us-east-1.amazonaws.com/<project-name>18 pullPolicy: Always19 # Overrides the image tag whose default is the chart appVersion.20 tag: "latest" # Recommended not to use latest2122#DON'T change imagePullSecrets23imagePullSecrets: []24 # - name: regcred2526nameOverride: ""27fullnameOverride: ""2829serviceAccount:30 # Specifies whether a service account should be created31 create: true32 # Automatically mount a ServiceAccount's API credentials?33 automount: true34 # Annotations to add to the service account35 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 template38 name: ""3940podAnnotations: {}41podLabels: {}4243podSecurityContext: {}44 # fsGroup: 20004546securityContext: {}47 # capabilities:48 # drop:49 # - ALL50 # readOnlyRootFilesystem: true51 # runAsNonRoot: true52 # runAsUser: 10005354service:55 type: ClusterIP56 port: 8057 targetPort: 8080 # Container Port5859ingress:60 enabled: true61 className: "nginx"62 annotations:63 kubernetes.io/ingress.class: nginx64 cert-manager.io/cluster-issuer: "letsencrypt-staging" # Please USE Staging when in dev mode. ONLY use prod when in prod65 nginx.ingress.kubernetes.io/enable-cors: "true"66 nginx.ingress.kubernetes.io/cors-allow-origin: "*" # Adjust this in prod67 hosts:68 - host: app.<project_name>.maosproject.co69 paths:70 - path: /71 pathType: ImplementationSpecific72 tls:73 - secretName: app-secrets74 hosts:75 - app.<project_name>.maosproject.co7677resources:78 limits:79 cpu: 250m80 memory: 1Gi81 requests:82 cpu: 150m83 memory: 512Mi8485livenessProbe:86 httpGet:87 path: /api/v1/health # Your Application MUST have a Healthcheck Endpoint88 port: 8080 # Container Port89 initialDelaySeconds: 1590 periodSeconds: 1591 timeoutSeconds: 2092 failureThreshold: 593readinessProbe:94 httpGet:95 path: /api/v1/health # Your Application MUST have a Healthcheck Endpoint96 port: 8080 # Container Port97 initialDelaySeconds: 2098 periodSeconds: 1599 timeoutSeconds: 20100 failureThreshold: 5101102autoscaling:103 enabled: false104 minReplicas: 1105 maxReplicas: 3106 targetCPUUtilizationPercentage: 80107 # targetMemoryUtilizationPercentage: 80108109110# Additional volumes on the output Deployment definition.111volumes: []112# - name: foo113# secret:114# secretName: mysecret115# optional: false116117# Additional volumeMounts on the output Deployment definition.118volumeMounts: []119# - name: foo120# mountPath: "/etc/foo"121# readOnly: true122123nodeSelector: {}124125tolerations: []126127affinity: {}
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 }}