Skip to content

Commit 529fa9a

Browse files
committed
docs: adding documentation on how to load the image to running kind cluster
1 parent c78b89e commit 529fa9a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,30 @@ The build artifacts will be stored in the `dist/` directory.
3131
3232
Run `npm test` to execute the unit tests via [Jest](https://jestjs.io/) in the root directory of the repository.
3333

34+
### Test your change in a locally running OpenMFP instance
35+
36+
- Build your docker container using
37+
- Load the docker image into your kind
38+
- Modify the deployment to always pull the latest image
39+
- Modify the deployment to use the `example-content:latest`
40+
- restart the deployment and wait for its completion
41+
- Patch Content Configurations to trigger a reconciliation
42+
43+
This can be achieved in a single command:
44+
```bash
45+
docker build -t example-content:latest . && \
46+
kind load docker-image example-content:latest --name=openmfp && \
47+
kubectl patch deployment openmfp-example-content -n openmfp-system --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/imagePullPolicy", "value": "IfNotPresent"}]' && \
48+
kubectl patch deployment openmfp-example-content -n openmfp-system --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "example-content:latest"}]' && \
49+
kubectl rollout restart deployment openmfp-example-content -n openmfp-system && \
50+
kubectl rollout status deployment openmfp-example-content -n openmfp-system && \
51+
kubectl patch contentconfiguration openmfp-example-content-ui -n openmfp-system --type='json' -p='[{"op": "replace", "path": "/spec/remoteConfiguration/internalUrl", "value": "http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/ui/assets/config.json?r='$(date +%s%3N)'"}]' && \
52+
kubectl patch contentconfiguration openmfp-example-content-wc -n openmfp-system --type='json' -p='[{"op": "replace", "path": "/spec/remoteConfiguration/internalUrl", "value": "http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/wc/assets/config.json?r='$(date +%s%3N)'"}]'
53+
```
54+
55+
**Troubleshooting**
56+
- If you encounter issues when starting the pod with the loaded image you [this issue](https://github.com/kubernetes-sigs/kind/issues?q=is%3Aissue%20state%3Aopen%20load%20image). A way to circumnvent this is to disable `Use containerd for pulling and storing images` in the docker settings.
57+
3458
## Issues
3559
We use GitHub issues to track bugs. Please ensure your description is
3660
clear and includes sufficient instructions to reproduce the issue.

0 commit comments

Comments
 (0)