Skip to content

Commit

Permalink
refactor: oci patching
Browse files Browse the repository at this point in the history
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
  • Loading branch information
akafazov committed Feb 7, 2025
1 parent c96105c commit b03c3e7
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 194 deletions.
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,32 @@ You are welcome to contribute with your pull requests. These steps explain the c
> **NOTE:** You should always add tests if you are adding code to our repository.
To let chart tests run locally, run `helm unittest -u <PATH TO CHART>`.
To start bootstrapping using the local charts from a local oci repository, package the charts and run the string with the `oci` parameter:
```sh
task helmpackage
./local-setup/scripts/start.sh oci
```

Also ensure the proper chart versions are referenced in the OCIRepository patches, before running the start script.

To reference local chart dependencies, change the Chart.yaml file to point to local chart folder like so:
```yaml
apiVersion: v2
name: openmfp
description: The OpenMFP chart for Kubernetes
type: application
version: 0.0.194
appVersion: "0.0.0"

dependencies:
- name: keycloak
version: 0.61.0
repository: file://../keycloak
condition: components.keycloak.enabled
```
After such change, Increment the `version` and make sure to run `helm dependency update` on to dependencies first and last on the top-level chart which links them. Update the patch versions to reflect your changes.

## Issues
We use GitHub issues to track bugs. Please ensure your description is
clear and includes sufficient instructions to reproduce the issue.
Expand Down
6 changes: 0 additions & 6 deletions local-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ To start the bootstrapping and local installation invoke
./local-setup/scripts/start.sh
```

To start bootstrapping using the local charts from a local oci repository, package the charts and run the string with the `oci` parameter:
```sh
task helmpackage
./local-setup/scripts/start.sh oci
```

Once the process is completed you can access the environment using http://localhost:8000

# Optional Steps
Expand Down
7 changes: 0 additions & 7 deletions local-setup/kustomize/components-oci/kustomization.yaml

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions local-setup/kustomize/components-oci/openmfp-crds/release.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions local-setup/kustomize/components-oci/openmfp-crds/repository.yaml

This file was deleted.

This file was deleted.

121 changes: 0 additions & 121 deletions local-setup/kustomize/components-oci/openmfp/release.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions local-setup/kustomize/components-oci/openmfp/repository.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion local-setup/kustomize/components/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: Kustomization

resources:
- openmfp-crds
- openmfp
- openmfp
- registry
3 changes: 2 additions & 1 deletion local-setup/kustomize/overlays/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: Kustomization

resources:
- ../../base
- ../../components
- ../../components/openmfp
- ../../components/openmfp-crds
5 changes: 2 additions & 3 deletions local-setup/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ helm upgrade -i -n flux-system --create-namespace flux oci://ghcr.io/fluxcd-comm
--set notificationController.create=false

echo -e "${COL}[$(date '+%H:%M:%S')] Starting deployments ${COL_RES}"
kubectl apply -k $SCRIPT_DIR/../kustomize/overlays/default

if [ "${1}" != "oci" ]; then
kubectl apply -k $SCRIPT_DIR/../kustomize/overlays/default
else
if [ "${1}" == "oci" ]; then
kubectl apply -k $SCRIPT_DIR/../kustomize/overlays/oci
sleep 10 # give time for the 'registry' pod to be created

Expand Down

0 comments on commit b03c3e7

Please sign in to comment.