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 helm chart. #107

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Add helm chart. #107

merged 2 commits into from
Oct 25, 2024

Conversation

mneverov
Copy link
Member

@mneverov mneverov commented Oct 25, 2024

Addresses #98

To test run helm install kube-network-policies -n kube-system charts/kube-network-policies.
admin-network-policy and baseline-admin-network-policy are enabled by default (values file baselineAdminNetworkPolicy: true).

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 25, 2024
@k8s-ci-robot k8s-ci-robot requested review from aojea and thockin October 25, 2024 10:41
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 25, 2024
@aojea
Copy link
Contributor

aojea commented Oct 25, 2024

awesome, do you mind add a sentence in

to mention this new install method?

- /bin/netpol
- --hostname-override=$(MY_NODE_NAME)
- --v=2
{{- if .Values.baselineAdminNetworkPolicy }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{- if .Values.baselineAdminNetworkPolicy }}
{{- if .Values.adminNetworkPolicy }}

I learned this recently, so there is Admin Network Policy, that has two CRD adminNetworkPolicy and baseAdminNetworkPolicy , so, maybe better to name Values.adminNetworkPolicy instead of Values.baselineAdminNetworkPolicy ??

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right.
JFYI, we specify both flags in install-anp. I could not come up with a generic parameter name that describes both AdminNetworkPolicy and BaselineAdminNetworkPolicy.
Renamed as suggested.

@aojea
Copy link
Contributor

aojea commented Oct 25, 2024

@mneverov naive question, the admin network policies require to install some CRDs, does helm practices recommend to embed those CRDs?

/usr/local/bin/kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/main/config/crd/experimental/policy.networking.k8s.io_adminnetworkpolicies.yaml
/usr/local/bin/kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/main/config/crd/experimental/policy.networking.k8s.io_baselineadminnetworkpolicies.yaml

@mneverov
Copy link
Member Author

@mneverov naive question, the admin network policies require to install some CRDs, does helm practices recommend to embed those CRDs?

For a user convenience CRDs are often embedded in the chart especially when they are defined in the same repo. CRDs can also be installed as a dependency, but in this case they should be also provided as a helm chart. I don't see helm charts for CRDs in network-policy-api, so users still need to install them manually.

@aojea
Copy link
Contributor

aojea commented Oct 25, 2024

This is awesome, thank you very much

/LGTM
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, mneverov

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:

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 25, 2024
@k8s-ci-robot k8s-ci-robot merged commit 640d832 into kubernetes-sigs:main Oct 25, 2024
13 checks passed
@mneverov mneverov mentioned this pull request Nov 5, 2024
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants