Kuadrant / authorino-operator

Kubernetes Operator to manage Authorino instances
Apache License 2.0
9 stars 20 forks source link

Helm charts #184

Closed didierofrivia closed 4 months ago

didierofrivia commented 5 months ago

This PR introduces a way to manage an Authorino Operator Helm Chart. This is not meant to replace the way we are building and delivering our manifests (Kustomize, OLM) but to provide an alternative (complementary) way of delivering the operator.

This early implementation uses Kustomize to create the chart template, instead of creating and maintaining new ones with Helm, to later customize the Helm only settings with its values.yaml

NOTES

Verification Steps

  1. Install helm locally

    make helm
  2. Create a local kind cluster

    kind create cluster --name kuadrant-local
  3. Install required dependency cert-manager

    kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.1/cert-manager.crds.yaml
# Add the Jetstack Helm repository
bin/helm repo add jetstack https://charts.jetstack.io --force-update

# Install the cert-manager helm chart
bin/helm install cert-manager --namespace cert-manager --version v1.12.1 jetstack/cert-manager --create-namespace

You should see it installed:

kubectl get deployments -n cert-manager
NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
cert-manager              1/1     1            1           7m32s
cert-manager-cainjector   1/1     1            1           7m32s
cert-manager-webhook      1/1     1            1           7m32s
  1. Deploy (install) the default (latest) Authorino Operator chart
    make helm-install

OR

bin/helm install authorino-operator charts/authorino-operator
  1. Verify the installed operator image:
    kubectl get deployments/authorino-operator -n authorino-operator -o yaml | grep image:

    it should return:

    image: quay.io/kuadrant/authorino-operator:latest

It should also have installed Authorino manifests and webhooks i.e:

kubectl get crds | grep auth
authconfigs.authorino.kuadrant.io           2024-07-01T08:26:05Z
authorinos.operator.authorino.kuadrant.io   2024-07-01T08:26:05Z
kubectl get deployment -n authorino-operator

NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
authorino-operator   1/1     1            1           2m6s
authorino-webhooks   1/1     1            1           2m6s
  1. Build new manifests with specific version of the operator

    make helm-build VERSION=0.12.0-alpha1 AUTHORINO_VERSION=0.17.2
  2. Upgrade the current installed operator to the freshly built one

    make helm-upgrade
  3. Check the installed operator image:

    kubectl get deployments/authorino-operator -n authorino-operator -o yaml | grep image:

it should return:

image: quay.io/kuadrant/authorino-operator:v0.12.0-alpha1
  1. For uninstalling the chart:
    make helm-uninstall
codecov-commenter commented 5 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.78%. Comparing base (9560c40) to head (66b80ee).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #184 +/- ## ======================================= Coverage 61.78% 61.78% ======================================= Files 2 2 Lines 785 785 ======================================= Hits 485 485 Misses 249 249 Partials 51 51 ``` | [Flag](https://app.codecov.io/gh/Kuadrant/authorino-operator/pull/184/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/Kuadrant/authorino-operator/pull/184/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant) | `61.78% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kuadrant#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

guicassolato commented 4 months ago

Verification steps seem to be applying 2 sets of deployments of cert-manager. One set in the cert-manager namespace and another in the default namespace. The deployments in the default namespace are prefixed by authorino-operator-. This seems redundant. Normally, we'd only have it deployed to the cert-manager.