Skip to content
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

fix: make deploy target #401

Conversation

vprashar2929
Copy link
Collaborator

@vprashar2929 vprashar2929 commented Jun 6, 2024

This PR address the issue #381 by:

  • Enabling cert-manager that is necessary by webhooks during the
    deployment of Operator on k8s.

  • Added a separate config for k8s that contains the manifests that
    are specific for deploying on k8s.

    • config/default points to OpenShift specific manifests
    • config/k8s points to manifests specific for k8s
  • Added overlays in manager to isolate k8s and
    OpenShift

@vprashar2929 vprashar2929 requested a review from sthaha June 7, 2024 05:19
@@ -2,6 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: kepler-operator-system/kepler-operator-serving-cert
Copy link
Collaborator

Choose a reason for hiding this comment

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

How does this behave on OpenShift that has cert-manager installed?

Makefile Outdated
Comment on lines 251 to 253
deploy: install cmctl ## Deploy controller to the K8s cluster specified in ~/.kube/config.
kubectl apply --server-side --force-conflicts -f \
https://github.com/jetstack/cert-manager/releases/download/v$(CERTMANAGER_VERSION)/cert-manager.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

Imagine running this on k8s with a cert-manager already installed and configured? Can this potentially break their system?

IMO, we should first validate if certmanager exists and install it only if there isn't any.
Additionally, consider exiting with error if cert-manager is absent.
We can also provide install-certmanager helper to make life easier for vanilla k8s installation.

hack/cluster.sh Outdated
@@ -31,7 +31,6 @@ declare -r PROJECT_ROOT
declare -r TMP_DIR="$PROJECT_ROOT/tmp"
declare -r DEV_CLUSTER_DIR="$TMP_DIR/local-dev-cluster"
declare -r BIN_DIR="$TMP_DIR/bin"
declare -r OPERATOR_SDK_VERSION=${OPERATOR_SDK_VERSION:-v1.27.0}
Copy link
Collaborator

Choose a reason for hiding this comment

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

any reason to remove this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

wasn't used in the script anywhere

Copy link
Collaborator

@sthaha sthaha left a comment

Choose a reason for hiding this comment

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

Thanks a lot @vprashar2929 !

This PR address the issue sustainable-computing-io#381 by:

* Enabling cert-manager that is necessary by webhooks during the
  deployment of Operator on k8s.

* Added a separate config for k8s that contains the manifests that
  are specific for deploying on k8s.
  * `config/default` points to OpenShift specific manifests
  * `config/k8s` points to manifests specific for k8s

* Added overlays in manager to isolate k8s and
  OpenShift

Signed-off-by: Vibhu Prashar <[email protected]>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Deleted this file as it wasn't used anywhere

@vprashar2929 vprashar2929 marked this pull request as draft June 14, 2024 11:42
@sthaha sthaha closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants