You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Added support for external-secrets
* fix: Update stripe setup to append secret to secrets manager instead of kubernetes
* fix: change script modes to executable
You can update the resource limits in the [kubernetes/base/deployment.yml][base-deployment], and control fine-grain customizations based on environment and specific deployments such as Scaling out your production replicas from the [overlays configurations][env-prod]
14
14
15
15
### Dev Environment
16
-
This project is set up with a local/cloud hybrid dev environment. This means you can do fast local development of a single service, even if that service depends on other resources in your cluster.
16
+
This project is set up with a local/cloud hybrid dev environment. This means you can do fast local development of a single service, even if that service depends on other resources in your cluster.
17
17
Make a change to your service, run it, and you can immediately see the new service in action in a real environment. You can also use any tools like your local IDE, debugger, etc. to test/debug/edit/run your service.
18
18
19
-
Usually when developing you would run the service locally with a local database and any other dependencies running either locally or in containers using `docker-compose`, `minikube`, etc.
19
+
Usually when developing you would run the service locally with a local database and any other dependencies running either locally or in containers using `docker-compose`, `minikube`, etc.
20
20
Now your service will have access to any dependencies within a namespace running in the EKS cluster, with access to resources there.
21
-
[Telepresence](https://telepresence.io) is used to provide this functionality.
21
+
[Telepresence](https://telepresence.io) is used to provide this functionality.
22
22
23
23
Development workflow:
24
-
24
+
25
25
1. Run `start-dev-env.sh` - You will be dropped into a shell that is the same as your local machine, but works as if it were running inside a pod in your k8s cluster
26
26
2. Change code and run the server - As you run your local server, using local code, it will have access to remote dependencies, and will be sent traffic by the load balancer
27
27
3. Test on your cloud environment with real dependencies - `https://<your name>-<% index .Params `stagingBackendSubdomain` %><% index .Params `stagingHostRoot` %>`
@@ -61,8 +61,21 @@ By default it requires `[lint, unit-test]` to be passing to allow Pull requests
61
61
<% end %>
62
62
63
63
## Database credentials
64
-
Your application is assumed[(ref)][base-deployment-secret] to rely on a database(RDS), In your Kubernetes
65
-
application namespace, an application specific user has been created for you and hooked up to the application already.
64
+
Your application is assumed to rely on a database. An application-specific user has been created for you by the `/scripts/create-db-user.sh` script in the infrastructure project.
65
+
A Kubernetes secret will exist in your application namespace (<% .Name %>) that will provide these credentials to your application.
66
+
67
+
## Secrets
68
+
Along with the database credentials, any other secrets that need to be provided to the application can be managed in AWS Secrets Manager.
69
+
Secrets have been created for each environment called `<% .Name %>/kubernetes/<environment>/<% .Name %>` which contain a list of environment variables that will be synced with the kubernetes secret in your namespace via a tool called [external-secrets](https://github.com/external-secrets/kubernetes-external-secrets)
70
+
Any secrets managed by `external-secrets` will be synced to kubernetes every 15 seconds. Keep in mind that any changes must be made in Secrets Manager, as any that are made to the secret on the kubernetes side will be overwritten.
71
+
You can see the `external-secrets` configuration in [kubernetes/overlays/staging/external-secret.yml](./kubernetes/overlays/staging/external-secret.yml) (this is the one for staging)
72
+
73
+
To work with the secret in AWS you can use the web interface or the cli tool:
The intent is that the last part of the secret name is the component of your application this secret is for. For example: if you were adding a new billing service, the secret might be called `<% .Name %>/kubernetes/stage/billing`
66
79
67
80
## Cron Jobs
68
81
An example cron job is specified in [kubernetes/base/cronjob.yml][base-cronjob].
@@ -136,6 +149,5 @@ The deployment only requires the environment variables:
0 commit comments