Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Generate deployment manifest #242

Merged
merged 26 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b160d84
remove hardcoded images
gazarenkov Feb 5, 2024
c659cc9
fix image
gazarenkov Feb 6, 2024
087e105
Update examples/janus-cr-with-app-configs.yaml
gazarenkov Feb 9, 2024
324c295
change lookup
gazarenkov Feb 9, 2024
b7dda01
Update config/manager/default-config/db-statefulset.yaml
gazarenkov Feb 9, 2024
a20200b
Update config/manager/default-config/deployment.yaml
gazarenkov Feb 9, 2024
100d61a
Merge remote-tracking branch 'origin/images' into images
gazarenkov Feb 9, 2024
5e3a13a
Merge remote-tracking branch 'upstream/main' into images
gazarenkov Feb 9, 2024
6f120f0
change lookup
gazarenkov Feb 9, 2024
63ecb40
change lookup
gazarenkov Feb 9, 2024
db63b44
Update config/manager/default-config/deployment.yaml
gazarenkov Feb 12, 2024
3dab91e
add generated files
gazarenkov Feb 12, 2024
bd34428
Merge remote-tracking branch 'upstream/main' into images
gazarenkov Feb 12, 2024
e5c0607
Merge remote-tracking branch 'origin/images' into images
gazarenkov Feb 12, 2024
d103026
fix image
gazarenkov Feb 13, 2024
f9f726f
Merge remote-tracking branch 'upstream/main' into images
gazarenkov Feb 14, 2024
7f4ec9d
fix service raw config
gazarenkov Feb 15, 2024
238801e
Merge remote-tracking branch 'upstream/main' into images
gazarenkov Feb 20, 2024
d3b6e08
Merge remote-tracking branch 'upstream/main' into images
gazarenkov Feb 26, 2024
b3417e0
Merge remote-tracking branch 'upstream/main' into images
gazarenkov Feb 27, 2024
3a81665
operator-script
gazarenkov Feb 27, 2024
4545be1
Update Makefile
gazarenkov Feb 28, 2024
a63f382
Merge remote-tracking branch 'upstream/main' into images
gazarenkov Feb 28, 2024
94f93d3
Merge remote-tracking branch 'origin/images' into images
gazarenkov Feb 28, 2024
cd13264
fix
gazarenkov Feb 28, 2024
d7d47ea
Apply suggestions from code review
rm3l Feb 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ gosec.sarif
# from prepare-restricted-environment script
catalog_mirror.log
manifests-rhdh-index-*
rhdh-operator-*.yaml
rhdh-disconnected-install/
rhdh-disconnected-install.Dockerfile

7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,10 @@ show-img:

show-container-engine:
@echo -n $(CONTAINER_ENGINE)

.PHONY: deployment-manifest
deployment-manifest: manifests kustomize ## Generate manifest to deploy operator.
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/default > rhdh-operator-${VERSION}.yaml
Copy link
Member

@rm3l rm3l Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add the rhdh-operator-*.yaml to .gitignore?
Or I'm wondering if it wouldn't make sense to also commit and push this automatically (to a file like deploy/rhdh-operator.yaml)? Just like what we are already doing with the bundle manifests..

This way, it would become even more straightforward to deploy the operator: kubectl apply -f https://raw.githubusercontent.com/janus-idp/operator/main/deploy/rhdh-operator.yaml
WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not like to suggest deploying "random" version from git repo in common case (it is good for ones who deal with sources but not sure for everyone else). I better add it to .gitignore as you suggested.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not like to suggest deploying "random" version from git repo

Well, the point is that this would not be random, but coming from the operator repo itself, so legitimate. Rather than having to deal with cloning the sources..
But anyway, fine for now to just Git-ignore it.
I think, for the future, this file could be generated and attached as a release artifact when we publish a new GH release.

@echo "Generated operator script rhdh-operator-${VERSION}.yaml"

12 changes: 11 additions & 1 deletion docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ make run

- Or deploy the controller to the cluster with the image specified by `IMG`:
```sh
make deploy IMG=<your-registry>/backstage-operator:tag
make deploy [IMG=<your-registry>/backstage-operator:tag]
```

- To generate deployment manifest, use:
```sh
make deployment-manifest [IMG=<your-registry>/backstage-operator:tag]
```
it will create the file rhdh-operator-${VERSION}.yaml on the project root and you will be able to share it to make it possible to deploy operator with:
```sh
kubectl apply -f <path-or-url-to-deployment-script>
```

### Uninstall CRDs
Expand Down Expand Up @@ -102,3 +111,4 @@ make manifests
**NOTE:** Run `make --help` for more information on all potential `make` targets

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)