...
- Create a service account. a role binding, and a service account token secret. See BuildSystem/artifact_storage/api/artifact_service_account.yaml at main · ad-build-test/BuildSystem (github.com)
- Apply this manifest with
kubectl apply -f artifact_service_account.yaml
- Then look at the secret
kubectl describe -n artifact secret/myexample-sa-token
- Add that to environment variable passed in to artifact_api_deployment.yaml BuildSystem/artifact_storage/api/artifact_api_deployment.yaml at main · ad-build-test/BuildSystem (github.com)
- Apply this manifest with
kubectl apply -f artifact_api_deployment.yaml
- What this does is starts the api deployment, it'll start the script to add in the kube config at $HOME/.kube/config, then start the api process
- done TODO: Create the script that initializes the kube configuration, then start the api process (probably bash)
How to test service is accessible to other build containers
- TODO: Apparently the artifact needs to be Other containers not in the same namespace as the build containers if they want to access it, so in that case, may just put the build containers in the artifact namespace?can still access the service with <service-name>.<namespace>.
- example: where artifact is the namespace
curl -X 'GET' http://artifact-api-service.artifact:8080/component