kustomize/components/custom-base-url/README.md
This component allows you to change the base URL for the Online Boutique application. By default, the application uses the root path ("/") as its base URL. This customization sets the base URL to "/online-boutique" and updates the health check paths accordingly.
BASE_URL environment variable to "/online-boutique" for the frontend deployment.To apply this customization, you can use Kustomize to include this component in your deployment.
From the kustomize/ folder at the root level of this repository, execute this command:
kustomize edit add component components/custom-base-url
This will update the kustomize/kustomization.yaml file, which could look similar to:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- base
components:
- components/custom-base-url
You can locally render these manifests by running:
kubectl kustomize .
To deploy the customized application, run:
kubectl apply -k .
If you want to use a different base URL, you can modify the value fields in the kustomization.yaml file. Make sure to update all three occurrences:
BASE_URL environment variableFor example, to change the base URL to "/shop", you would modify the values as follows:
value: /shop
value: /shop/_healthz
value: /shop/_healthz
Note: After changing the base URL, make sure to update any internal links or references within your application to use the new base URL.