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

Provides support for installing on vanilla kubernetes #99

Merged
merged 8 commits into from
Jan 16, 2024

Conversation

phantomjinx
Copy link
Member

@phantomjinx phantomjinx commented Jan 12, 2024

  • Upgrades the deprecated api/batch/v1beta1 to api/batch/v1;
  • Formats test results using gotestfmt;
  • Provides capabilities API for discovering the type of cluster (OpenShift or Kubernetes) based on the existence of installed APIs, also providing the Kubernetes version and/or the OpenShift release version;
  • Tidies up function calls by wrapping parameter variables into structs;
  • Provides self-signed certificate creation and installation for the hawtio-online-tls-serving secret required for k8;
  • cr and uninstall rules for Makefiles;
  • Creation of ingress for Kubernetes and route for OpenShift;

Should be merged / rebased after
1. #101
2. #102

@phantomjinx phantomjinx self-assigned this Jan 12, 2024
Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

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

Can you please split the mere dependency updates from the substantial changes?

1731 files changes make it impossible to review it on GitHub as the browser becomes frozen...

@tadayosi
Copy link
Member

You can also format test code separately from the issue.

@phantomjinx
Copy link
Member Author

Checks will fail until #101 has been merged.

@phantomjinx phantomjinx force-pushed the k8-support branch 2 times, most recently from 489411d to 3ca2f87 Compare January 15, 2024 13:10
…wtio#100

* APICapabilities determines cluster version and existence of certain
  APIs, eg. Routes. From this determination, it concludes whether the
  cluster is OpenShift4 compatible

* Allows a clear determination as to whether this is an OpenShift cluster
  or vanilla Kubernetes. This can be used to make choices on what to
  install, eg. Route or Ingress

* Have the cluster capabilities evaluated on initialising of the operator
…hawtio#100

* Only evaluate the Route API if it is present in the cluster.
* hawtio_controller.go
 * Rather than adding to the extensive list of function parameters, roll
   them up into a single struct that can be populated then passed around
   instead

* deployment.go
 * Pass in the capabilities.ApiSpec that wraps up both the IsOpenShift and
   version properties
* The function generateCertificateSecret can be used for both OpenShift
  CA signing and self-signing certificates. Just a case of determining
  what is used as both the caCertificate and caPrivateKey (self-signing
  uses the generated certificate and private key)

* Rather than using the same function with the caSecret as nil, makes it
  obvious which to use by providing front functions that describe which
  sort of certificate secret will be created

	install-operator.sh
* Removes all of setup, operator and app resources
* Chooses between route (openshift-only) and ingress API types

* Installs self-signed certificate for kubernetes installs for the
  hawtio-online-serving secret

* Only reconcile an OAuth client if on OpenShift for now

* Ensures the HAWTIO_ONLINE_AUTH envvar is always populated to specify the
  authentication type rather than relying on the fallback in the actual
  hawtio-online image config.sh script

* Differentiate between openshift and k8 code by putting in different files
  and packages if possible
…atus hawtio#100

* While the extraction of the route url is quite straightforward, the
  use of ingress path rules and no hosts makes the return of a single
  string quite difficult. This may well need work in the future to
  improve the value returned
@phantomjinx phantomjinx merged commit f1c359f into hawtio:main Jan 16, 2024
2 checks passed
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