Skip to content

change the default versions to be clearly placeholders #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,21 @@ If changes are made to any Go code (like in the `controllers` dir for example),
- This will check and build/compile the modified code

For building and pushing a new version of the operator image:
- `make image-build -e IMG=<image-repo/image-name>`
- `make image-push -e IMG<image-repo/image-name>`
- `make image-build -e IMAGE_TAG_BASE=<image-repo/image-name> VERSION=<semver>`
- `make image-push -e IMAGE_TAG_BASE=<image-repo/image-name> VERSION=<semver>`

For deploying onto a cluster:
- First, either set `KUBECONFIG` or ensure you are logged into a cluster in your environment
- `make install`
- `make deploy -e IMG=<image-repo/image-name>`

For building and pushing a new version of the bundled operator image:
- `make bundle-build -e IMAGE_TAG_BASE=<image-repo/image-name> VERSION=<new semver> PREVIOUS_VERSION=<semver to replace>`
- `make bundle-push -e IMAGE_TAG_BASE=<image-repo/image-name> VERSION=<new semver> PREVIOUS_VERSION=<semver to replace>`

To create a new openshift-community-operator-release:
- `make openshift-community-operator-release -e IMAGE_TAG_BASE=<image-repo/image-name> VERSION=<new semver> PREVIOUS_VERSION=<semver to replace>`

## Testing
The CodeFlare Operator currently has unit tests and pre-commit checks
- To enable and view pre-commit checks: `pre-commit install`
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# best if we could detect this. If we cannot, we need to document it somewhere.
# then we can add a patch in the `PHONY: bundle`

PREVIOUS_VERSION ?= 0.0.3
VERSION ?= 0.0.4
PREVIOUS_VERSION ?= 0.0.0-dev
VERSION ?= 0.0.0-dev

# INSTASCALE_VERSION defines the default version of the InstaScale controller
INSTASCALE_VERSION ?= v0.0.4
Expand Down Expand Up @@ -170,6 +170,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/default | kubectl apply -f -
git restore config/*

.PHONY: undeploy
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
Expand Down Expand Up @@ -241,6 +242,7 @@ bundle: defaults manifests kustomize install-operator-sdk ## Generate bundle man
cd config/manifests && $(KUSTOMIZE) edit add patch --patch '[{"op":"add", "path":"/spec/replaces", "value": "codeflare-operator.v$(PREVIOUS_VERSION)" }]' --kind ClusterServiceVersion
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
$(MAKE) validate-bundle
git restore config/*
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we may want to git restore also in the deploy target, for consistency.


.PHONY: bundle-build
bundle-build: bundle ## Build the bundle image.
Expand Down
4 changes: 0 additions & 4 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@ configMapGenerator:
name: manager-config
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: quay.io/project-codeflare/codeflare-operator
newTag: v0.0.2
7 changes: 0 additions & 7 deletions config/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@ resources:
- ../scorecard
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
patches:
- patch: '[{"op":"add", "path":"/metadata/annotations/containerImage", "value": "quay.io/project-codeflare/codeflare-operator:v0.0.1" }]'
target:
kind: ClusterServiceVersion
- patch: '[{"op":"add", "path":"/metadata/annotations/containerImage", "value": "quay.io/project-codeflare/codeflare-operator:v0.0.2" }]'
target:
kind: ClusterServiceVersion