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

change to generate kustomize base files from helm chart #1634

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

hhk7734
Copy link
Member

@hhk7734 hhk7734 commented Nov 23, 2023

Fixes #1546

Hi!
Changed Helm templates for more flexiblity and added scripts to generate kustomize default files from charts.

When I compared the operator-hub bundles before and after changes, I got the below.

diff -r bundle_old bundle
diff --color -r bundle_old/manifests/knative-operator.v1.6.0.clusterserviceversion.yaml bundle/manifests/knative-operator.v1.6.0.clusterserviceversion.yaml
28c28
<     createdAt: "2023-11-23T13:22:01Z"
---
>     createdAt: "2023-11-23T15:59:22Z"

@knative-prow knative-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 23, 2023
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.21%. Comparing base (f32bc7c) to head (1f3918d).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1634      +/-   ##
==========================================
+ Coverage   63.54%   66.21%   +2.67%     
==========================================
  Files          53       53              
  Lines        2584     2081     -503     
==========================================
- Hits         1642     1378     -264     
+ Misses        827      588     -239     
  Partials      115      115              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tynfojlyue
Copy link

I think this is a great change.

@houshengbo
Copy link
Contributor

@hhk7734 Would you mind trying to fix the CI build issues for this PR?

@hhk7734
Copy link
Member Author

hhk7734 commented Feb 8, 2024

I just rebased to origin/main without changing any code. :)

@hhk7734
Copy link
Member Author

hhk7734 commented Feb 13, 2024

/test eventing-upgrade-tests

@@ -1,6 +1,6 @@
apiVersion: v1
name: knative-operator
version: {{ version }}
version: 1.10.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you pin a specific version? I think we would like to release the charts based on different versions.

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 the following user scenario:

  1. git clone
  2. checkout to the user wanted version
  3. edit values.yaml
  4. helm install knative-operator ./config/charts/knative-operator

In this scenario, I guess, users

  • rarely look at Charts.yaml.
  • rarely modify tags or versions.

So I wrote down the operator version at the time of work. Should I revert it?

knative_operator:
knative_operator:
image: gcr.io/knative-releases/knative.dev/operator/cmd/operator
tag: {{ tag }}
tag: v1.10.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you pin a specific version?

operator_webhook:
image: gcr.io/knative-releases/knative.dev/operator/cmd/webhook
tag: {{ tag }}
tag: v1.10.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you pin a specific version?

@ryan-dyer-sp
Copy link

Can you please include the ability to add custom annotations to all of the objects? Our use case would be to bundle the operator with default knativeserving/eventing objects along with the kafka eventing controller within an argocd application and we would need to control install order via argo's sync-wave annotations. The kafka eventing controller does not offer a helm chart so we only have a manifest file which would run at a default order of 0. So the ability to say the operator's sync-wave itself is <0 would be great.

Copy link

@ryan-dyer-sp ryan-dyer-sp left a comment

Choose a reason for hiding this comment

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

There are still a few namespace: default references. Shouldnt these all be namespace: {{ include "knativeOperator.namespace" .}}

@hhk7734
Copy link
Member Author

hhk7734 commented Mar 11, 2024

Hi! @ryan-dyer-sp

Can you please include the ability to add custom annotations to all of the objects? Our use case would be to bundle the operator with default knativeserving/eventing objects along with the kafka eventing controller within an argocd application and we would need to control install order via argo's sync-wave annotations. The kafka eventing controller does not offer a helm chart so we only have a manifest file which would run at a default order of 0. So the ability to say the operator's sync-wave itself is <0 would be great.

I plan to add patterns that are frequently seen in helm values, as shown below. However, if there are too many changes in this PR, the review will be difficult, so I think it would be better to proceed with the follow-up work once this PR is merged.

commonLabels: {}

operator:
  labels: {}
  annotations: {}
  podLabels: {}

There are still a few namespace: default references. Shouldnt these all be namespace: {{ include "knativeOperator.namespace" .}}

Files with namespace: default are not in config/charts/. These are the base files for kustomize.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2024
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 26, 2024
Copy link

knative-prow bot commented Apr 26, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hhk7734
Once this PR has been reviewed and has the lgtm label, please assign psschwei 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

@hhk7734 hhk7734 marked this pull request as draft April 26, 2024 07:31
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 26, 2024
@hhk7734 hhk7734 marked this pull request as ready for review April 29, 2024 02:37
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change to generate kustomize base files from helm chart
5 participants