Some of our services have moved to be self contained helm charts. They are included within Chart.yaml as dependencies.
- Fleetscheduler (OPTIONAL, enable in values.yaml fleetscheduler.enable)
make <SERVICE>-local DIR=<RELATIVE-PATH>
will automatically swap out your <SERVICE>
with the local repo of that service found at <RELATIVE-PATH>
. DIR is optional, and defaults to the parent folder: ../
.
Example:
- Assuming Fleet-Scheduler is cloned into the same parent directory as the sandbox.
- call
make fleet-scheduler-local
to now use the local service instead of the upstream service. Note: This will editChart.yaml
, do not commit those changes! make install
will now install the sandbox with the local service. Note: You must still build you app and push the docker image (usingmake push-image-devel
). To revert back to upstream. callmake fleet-scheduler-upstream
.
To replace a dependency with a local version of the dependency you are working on, you can edit the dependency within the Chart.yaml, and can refer to the helm docs for more information.
For example: To replace fleet-scheduler's upstream helm chart with a local custom version, you must do the following:
- Clone Fleet-Scheduler. Preferably in the same directory as the Sandbox
- Replace the repository URL for fleet-scheduler with the relative path (and prefixed with
file://
) to your cloned repository's chart folder, and make sure the versions match.- So if you have this in
parentFolder/fleet-scheduler/chart/Chart.yaml
:apiVersion: v2 name: fleet-scheduler version: v0.1.7 description: A chart for fleet scheduled cron jobs
- And the fleet-scheduler dependency within
parentFolder/sandbox/Chart.yaml
is this:
- name: fleet-scheduler version: v0.1.0 repository: https://metal-toolbox.github.io/fleet-scheduler
parentFolder/sandbox/Chart.yaml
's fleet-scheduler dependency becomes this:
- name: fleet-scheduler version: v0.1.7 repository: file://../fleet-scheduler/chart
- Note: This is assuming the sandbox and fleet-scheduler have the same parent folder.
- So if you have this in
- Inform the Fleet-Scheduler helm chart you are using a local docker image instead of upstream
- Within
parentFolder/sandbox/values.yaml
, you have this for your fleet-scheduler definition
fleet-scheduler: enable: true # when enabled, metal-toolbox/fleet-scheduler will need to be deployed with `make push-image-devel` <<: *image_anchor <<: *env_anchor
- Change it to this to overwrite the image url and tag
fleet-scheduler: enable: true # when enabled, metal-toolbox/fleet-scheduler will need to be deployed with `make push-image-devel` <<: *image_anchor image: repository: tag: latest url: localhost:5001 <<: *env_anchor
- Then
cd
into the fleet-scheduler repository and runmake push-image-devel
to build and deploy the docker image for the helm chart to use.
- Within