-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
* Replace `curlimages/curl` with `extension-init` Replaced curlimages/curl docker image in the namespace-metadata Job with linkerd's extension-init image, to avoid all the OS luggage included in the former, which generates CVE alerts.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,23 @@ subjects: | |
- kind: ServiceAccount | ||
name: namespace-metadata | ||
namespace: {{.Release.Namespace}} | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
namespace: {{ .Values.linkerdNamespace }} | ||
labels: | ||
linkerd.io/extension: smi | ||
annotations: | ||
"helm.sh/hook": post-install | ||
"helm.sh/hook-weight": "0" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
name: smi-namespace-metadata-linkerd-config | ||
roleRef: | ||
kind: Role | ||
name: ext-namespace-metadata-linkerd-config | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
alpeb
Author
Member
|
||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
name: namespace-metadata | ||
namespace: {{.Release.Namespace}} |
the
ext-namespace-metadata-linkerd-config
role only exists in linkerd's control plane namespace (typicallylinkerd
), not in the smi namespace.same goes for the
linkerd-config
config map itself:since the
smi-adaptor
is supposed to be deployed in a different namespace from linkerd's control plane (so that proxy injection can be done, which is disabled in linkerd's control plane namespace), relying on resources that can only be found in linkerd's control plane namespace is kinda broken. 😞by the way, if the
ext-namespace-metadata-linkerd-config
role is supposed to be a generic mechanism for allowing linkerd components in other namespaces to read thelinkerd-config
config map, then this must be a cluster role, not a role. and instead of a role binding you must use a cluster role binding to bind to that cluster role.i can make the
namespace-metadata
job work by adding the following rbac config:...but this definitely isn't great!
plus i don't understand why the
namespace-metadata
job needs access to thelinkerd-config
config map in the first place. all the job does is label the smi namespace.since i'm creating the
linkerd-smi
namespace elsewhere with the correct labels and annotations, i don't need this job at all.so might i suggest that you make this job optional with something along the lines of