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

feat: update helm chart to work with kong as a gateway #8735

Merged
merged 26 commits into from
Mar 6, 2024
Merged

Conversation

floreks
Copy link
Member

@floreks floreks commented Mar 1, 2024

Helm

This is a complete overhaul of the helm chart. It includes:

  • Added DBless, single-container kong deployment as a default gateway for the Kubernetes Dashboard. This is a required dependency.
  • Settings ConfigMap name/namespace is now configurable via values.yamlweb.settings.configMap entry.
  • Scaling configuration has been split to allow configuring replicas per every container separately.
  • Metrics scraper service name is no longer hardcoded in the API container. Its name is now generated similarly to other deployments/services.
  • CSRF key is now generated by the helm and imported as an env var into the containers. This allowed us to drop generation logic and direct dependency on this secret from code.
  • Image pull secrets are now properly respected by all deployments.
  • RBACs for every deployment have been separated to make sure that every container gets as little permissions as possible.
  • Ingress configuration has been updated to be more flexible:
    • Dashboard can now be served more easily on a subpath simply by enabling app.ingress.enabled=true and app.ingress.path=/dashboard. It would serve Dashboard on https://localhost/dashboard by default.
    • Default annotations can now be disabled via app.ingress.useDefaultAnnotations=false
    • ingressClassName can now be skipped from spec and it should fallback to using default ingress class (if configured). It is controlled by app.ingress.useDefaultIngressClass.
  • Helm chart now supports API only mode meaning that you can deploy only an API container. This can be achieved by below configuration:
    • app.mode=api
    • kong.enabled=false
    • Optionally you can also disable metrics with api.containers.args={--metrics-provider=none}
  • cert-manager, nginx and metrics-server are now disabled by default. Only kong dependency is required.
  • clusterReadOnlyRole has been removed since it is no longer possible to use Dashboard permissions to access the cluster. User access is required at all times.

Web

  • Settings save now uses user permissions instead of Dashboard.
  • Removed restore settings ConfigMap logic
  • Increased default resource autorefresh time interval to 10 seconds
  • Added a small script to index.html to dynamically generate <base href=...> tag.

API

  • Added csrf-key argument - Base64 encoded random 256 bytes key. Can be loaded from 'CSRF_KEY' environment variable.

Auth

  • Added csrf-key argument - Base64 encoded random 256 bytes key. Can be loaded from 'CSRF_KEY' environment variable.

Fixes

Some other issues were fixed along the way.

Fixes #8172
Fixes #8340
Fixes #8148
Fixes #8137
Fixes #8053
Fixes #8224
Fixes #3686

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 1, 2024
@floreks floreks marked this pull request as draft March 1, 2024 17:10
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 1, 2024
@floreks floreks self-assigned this Mar 1, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Merging #8735 (70a235d) into master (9a2e47e) will increase coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is 9.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8735      +/-   ##
==========================================
+ Coverage   35.77%   35.80%   +0.02%     
==========================================
  Files         252      252              
  Lines       10708    10705       -3     
  Branches      156      157       +1     
==========================================
+ Hits         3831     3833       +2     
+ Misses       6626     6621       -5     
  Partials      251      251              

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 4, 2024
@floreks floreks added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 5, 2024
@floreks floreks changed the title wip: update helm chart to work with kong as a gateway feat: update helm chart to work with kong as a gateway Mar 6, 2024
@floreks floreks marked this pull request as ready for review March 6, 2024 11:05
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 6, 2024
Copy link
Member

@maciaszczykm maciaszczykm left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 6, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floreks, maciaszczykm

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [floreks,maciaszczykm]

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

@floreks floreks merged commit 116f74e into master Mar 6, 2024
12 of 14 checks passed
@floreks floreks deleted the update/chart branch March 7, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
3 participants