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

add kubermatic-installer-operator proposal #13327

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohamed-rafraf
Copy link
Member

What this PR does / why we need it:
This is a proposal for kubermatic installer operator
Which issue(s) this PR fixes:

Fixes #

What type of PR is this?

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

NONE

Documentation:

NONE

@kubermatic-bot kubermatic-bot added docs/none Denotes a PR that doesn't need documentation (changes). release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Apr 23, 2024
@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign waseem826 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 23, 2024
Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

Some comments. Overall I want to say that I'm very glad that you've picked up this pain point of our UX and want to improve it, I just think it's achievable with less overhead. Nonetheless, congrats to writing your first KKP proposal! 🎉

Comment on lines +23 to +34
## Proposal

A new Kubermatic Installer Operator that utilizes a CRD called `KubermaticInstallation`
(Since `KubermaticConfiguration` exist).The operator will handle the deployment and management
of the Kubermatic stack by watching for changes to instances of `KubermaticInstallation` CRD.

* **KubermaticInstalltion CRD:** Define all necessary configurations needed for the Kubermatic installation
in a single Kubernetes resource
* **Kubermatic Installer Operator:** A controller that reacts to changes to KubermaticInstallation resources
by deploying or updating the Kubermatic stack according to the specified configuration.
* **Dependencies Management:** The operator will manage dependencies like cert-manager, nginx-ingress-controller,
and Dex, ensuring they are installed or upgraded as necessary before deploying Kubermatic components.
Copy link
Member

Choose a reason for hiding this comment

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

The motivation is good and we've discussed this in SIG Cluster Management numerous time (with some consensus), but in my opinion the proposal needs refinement. Why are we adding another CRD that describes the same thing as a KubermaticConfiguration - a KKP setup?

KKP already has the kubermatic-operator, which is responsible for upgrading all KKP components. What is the benefit of adding an outer operator layer that just exists to run a bit of migration and verification code and then increment the inner operator version, instead of e.g. moving the migration code into the existing operator?

If we get rid of the installer and deliver a Helm chart to install (any) operator, why not create a meta/umbrella chart that installs kubermatic-operator (the existing one) and the dependencies (cert-manager, ingress controller, etc)?

Copy link
Contributor

Choose a reason for hiding this comment

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

meta/umbrella chart

Even here I wonder what the benefit is. I think mainly that you keep a consistent set of versions and don't install each latest version of each dependency individually.

Because if the umbrella Chart were to include everything, everyone would complain that it installs too much. So each component would need to be optional anyway, at which point the benefit of the umbrella chart might diminish. Again, besides the good point of having one set of versions blessed by us when we tag a KKP release.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the feedback, I understand the concerns about introducing a new layer when we already have kubermatic-opertor. The key motivation behind proposing an installer operator is to provide a solution that can manage not just the core KKP components, but also additional stacks such as monitoring, logging, backups, etc., which the current kubermatic-operator does not handle. The goal is to offer a unified, automated experience for admins and KKP users

The CRD will not describe the same thing as KubermaticConfiguration, but the other stacks

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is the way to go, but just for the sake of poking this argument:

Why include all the things already configurable by KubermaticConfiguration if what you want to focus on are actually just the dependencies? What is the benefit of having all of those KKP settings effectively doubled? Wouldn't it make more sense to have a DefaultStack resource or something that we add to the existing kubermatic-operator and give it the capability to deploy dependencies alongside reconciling KubermaticConfiguration?

In addition, I think the question regarding the benefit of this over providing a meta Helm chart also still stands.


An administrator wishes to install or upgrade their Kubermatic system::

1. The admin prepares a `KubermaticInstallation` manifest. The goal here is to avoid splitting the configuration and customization to be split into different places and manifests like Helm `values.yaml` file, `KubermaticConfiguration` etc
Copy link
Member

Choose a reason for hiding this comment

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

How does the KubermaticInstallation CRD (and the operator) get into the cluster in the first place?

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 was thinking of making the operator very simple so it could be installed with one yaml manifest that contains the CRD, deployment and necessary RBAC permissions. This approach would enable a one-command installation, simplifying the initial setup

Copy link
Member

Choose a reason for hiding this comment

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

Okay, but my point here was that the installation process is missing a step (installing this new operator) which makes it look more simple than it actually is. We should strive for completeness when describing admin UX and workflows.

Comment on lines +80 to +86
seed:
- name: seed-1
etcdBackupRestore:
defaultDestination: minio-ext-endpoint
#######################
### SKIP SEED CONFIG ###
#######################
Copy link
Member

Choose a reason for hiding this comment

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

What do we gain from this "monolith" CRD over storing multiple YAML documents in a kubermatic.yaml which holds the KubermaticConfiguration "master config" object and multiple Seed objects which you then apply?

I mean:

apiVersion: kubermatic.k8c.io/v1
kind: KubermaticConfiguration
metadata:
  name: kubermatic
  namespace: kubermatic
spec:
  [...]
---
apiVersion: kubermatic.k8c.io/v1
kind: Seed
metadata:
  name: seed-1
spec:
  [...]
---
apiVersion: kubermatic.k8c.io/v1
kind: Seed
metadata:
  name: seed-2
spec:
  [...]

Copy link
Member

Choose a reason for hiding this comment

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

(assuming we change the way we ship the Seed CRD). But I'd be very sceptical to add fields to one CRD to generate another CRD on the same layer of the KKP installation, just because currently the CRD isn't there at that time.

Copy link
Member Author

Choose a reason for hiding this comment

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

The design of the KubermaticInstallation CRD is flexible, allowing you to either define all components within one comprehensive manifest or split them into individual manifests for each stack, depending on your management preferences. It's not mandatory to create a monolithic YAML manifest. you can choose to apply configurations for each stack separately with their own specific specs. This ensures that the CRD can support a variety of deployment strategies

Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this point. Are you saying you could apply the same KubermaticInstallation multiple times with only specific settings set to configure the components? That doesn't sound very declarative.


## Proposal

A new Kubermatic Installer Operator that utilizes a CRD called `KubermaticInstallation`
Copy link
Contributor

Choose a reason for hiding this comment

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

This sounds like we're re-inventing existing Helm operators that simply watch some CRD and install Helm charts into the cluster. What would be the benefit and effort of writing a custom one?

KKP already has had multiple bugs in its App feature when it tries to automate managing Helm installations. I'm fearful of writing a Helm reconciler myself.

@mohamed-rafraf
Copy link
Member Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants