updated template manifests: service-account.yaml to handle get,list,w… - #55
Conversation
…atch,delete of secrets; virtual-kubelet-config.yaml (InterLinkConfig.yaml) to handle IngressTLS and IngressClusterIssuer fields. Updated values.yaml appropriately to manage the new fields Signed-off-by: Giulio Bianchini <giulio.bianchini@hotmail.it>
There was a problem hiding this comment.
Pull request overview
This PR updates the interLink Helm chart to (1) expand the virtual-node ServiceAccount’s RBAC permissions and (2) pass new ingress TLS-related network settings into the virtual-kubelet configuration.
Changes:
- Expanded ClusterRole rules (adds
replicasets; expandssecretsverbs). - Added
ingressTLSandingressClusterIssuervalues undervirtualNode.network. - Propagated the new ingress TLS settings into the rendered
InterLinkConfig.yamlfor the virtual kubelet.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
interlink/values.yaml |
Adds new virtualNode.network values for ingress TLS configuration. |
interlink/templates/virtual-kubelet-config.yaml |
Renders the new TLS-related network fields into the virtual-kubelet config map. |
interlink/templates/service-account.yaml |
Expands ClusterRole permissions (including secrets access changes). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - secrets | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - delete |
There was a problem hiding this comment.
if IngressTLS is on, the -tls secret si deleted by the virtual kubelet when there is a pod deletion.
Without the delete on secrets for the ClusterRole, the virtual node will not be able to cleanup things properly
There was a problem hiding this comment.
in which namespace will the tls secret be created? Is there a way to reduce it to a namespace only?
There was a problem hiding this comment.
The tls secret is created in the same namespace as the Ingress. The namespace can be:
- When default shadow mode a dedicated namespace -wstunnel
- When
interlink.eu/shadow-same-ns: "true"the pod's own namespace
A shared namespace for all shadow resources maybe can be a solution but it rquires code changes VK side and for some specific use cases, like ISTIO, this would be a problem since it requires the offloaded pod and the shadow pod run in the same namespace (and therefore, the TLS created in the same namespace).
In any case, to avoid having the ClusterRole enabling the VK SA to delete secrets, it can be enabled only when ingressTLS is true
{{- if .Values.virtualNode.network.ingressTLS }}
# Clean up cert-manager-issued TLS secrets for tunnel ingresses
- delete
{{- end }}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This pull request introduces enhancements to both the service account permissions and the virtual node network configuration for
interlink. The main changes include expanding Kubernetes RBAC rules to allow more operations on secrets and additional resources, and adding support for ingress TLS configuration in the virtual node setup.RBAC (Role-Based Access Control) updates:
replicasetsto the list of resources the service account can manage within theappsAPI group.secretsto includeget,list,watch, anddeleteverbs, allowing the service account to read and manage secrets.Virtual node network configuration enhancements:
ingressTLS(to enable TLS for ingress) andingressClusterIssuer(to specify a ClusterIssuer for TLS certificates) in bothvirtual-kubelet-config.yamlandvalues.yaml. [1] [2]