Add Service Dependencies
When working with Kustomized projects there is often a need to add service dependencies.
Service dependencies are added via components from the kustomize-modules directory or git references. The intent is to eventually use only the git references.
Add a dependency via kustomize module component
For dependencies used as a kustomize module, the directory of the needed dependency can be copied over directly from https://coderepo.mobilehealth.va.gov/projects/CKM/repos/kustomize-modules/browse to the /kubernetes/dev-with-depdendencies/ folder. After copying the file over, the kustomization.yaml file in the /kubernetes/dev-with-depdendencies/ directory must be updated to use it as a component.
For example if user-session-service was added as a dependency, then the kustomization would have it added to the components section like this:
components:
- ../components/dev
- ../components/jacoco
- user-session-service
Add a dependency via git reference
Adding a dependency as a git reference means only making an update to kubernetes/dev-with-development/kustomization.yaml.
An example of the common-app-config and user-session service being used as a dependency would look like this:
resources:
- https://coderepo.mobilehealth.va.gov/scm/ckm/common-app-config.git//dev?ref=main
components:
- ../components/dev
- ../components/jacoco
- https://coderepo.mobilehealth.va.gov/scm/iums/user-session-service.git//kubernetes/components/dev?ref=Release/1.21