Skip to content

Commit db3f0e0

Browse files
committed
chore: Remove legacy NODE_NAME CLI arg/env var
1 parent 129c890 commit db3f0e0

File tree

6 files changed

+16
-21
lines changed

6 files changed

+16
-21
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ All notable changes to this project will be documented in this file.
3939
- BREAKING: Bump stackable-operator to 0.94.0 and update other dependencies ([#619]).
4040
- The default Kubernetes cluster domain name is now fetched from the kubelet API unless explicitly configured.
4141
- This requires operators to have the RBAC permission to get nodes/proxy in the apiGroup "". The helm-chart takes care of this.
42-
- The CLI argument `--kubernetes-node-name` or env variable `KUBERNETES_NODE_NAME` needs to be set. The helm-chart takes care of this.
42+
- The CLI argument `--kubernetes-node-name` or env variable `KUBERNETES_NODE_NAME` needs to be set.
43+
It supersedes the old argument/env variable `NODE_NAME`.
44+
The helm-chart takes care of this.
4345

4446
### Fixed
4547

deploy/helm/secret-operator/templates/daemonset.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,21 @@ spec:
3636
env:
3737
- name: CSI_ENDPOINT
3838
value: /csi/csi.sock
39-
- name: NODE_NAME
40-
valueFrom:
41-
fieldRef:
42-
apiVersion: v1
43-
fieldPath: spec.nodeName
4439
- name: PRIVILEGED
4540
value: {{ .Values.securityContext.privileged | quote }}
46-
{{- if .Values.kubernetesClusterDomain }}
47-
- name: KUBERNETES_CLUSTER_DOMAIN
48-
value: {{ .Values.kubernetesClusterDomain | quote }}
49-
{{- end }}
50-
{{- include "telemetry.envVars" . | nindent 12 }}
41+
5142
# Operators need to know the node name they are running on, to e.g. discover the
5243
# Kubernetes domain name from the kubelet API.
5344
- name: KUBERNETES_NODE_NAME
5445
valueFrom:
5546
fieldRef:
5647
fieldPath: spec.nodeName
48+
49+
{{- if .Values.kubernetesClusterDomain }}
50+
- name: KUBERNETES_CLUSTER_DOMAIN
51+
value: {{ .Values.kubernetesClusterDomain | quote }}
52+
{{- end }}
53+
{{- include "telemetry.envVars" . | nindent 12 }}
5754
volumeMounts:
5855
- name: csi
5956
mountPath: /csi

docs/modules/secret-operator/pages/troubleshooting.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
.. Is the StorageClass configured to use the provisioner named `secrets.stackable.tech`?
1717
. Does the PersistentVolume have any relevant events? (`kubectl describe pv/$PV_NAME`)
1818
. Is the CSIDriver object named `secrets.stackable.tech` configured correctly?
19-
. Is the CSI driver registered on the relevant CSINode objects? (`kubectl get csinode/$NODE_NAME -o yaml` should contain the driver `secrets.stackable.tech`)
19+
. Is the CSI driver registered on the relevant CSINode objects? (`kubectl get csinode/$KUBERNETES_NODE_NAME -o yaml` should contain the driver `secrets.stackable.tech`)
2020
.. If not, please check if your Kubernetes distribution uses a non-default kubelet dir.
2121
The distributions known to be using a non-default kubelet dir are listed in the xref:installation.adoc[installation guide].
2222
Please follow the special installation guide there.

rust/operator-binary/src/main.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ struct SecretOperatorRun {
3939
#[clap(long, env)]
4040
csi_endpoint: PathBuf,
4141

42-
#[clap(long, env)]
43-
node_name: String,
44-
4542
/// Unprivileged mode disables any features that require running secret-operator in a privileged container.
4643
///
4744
/// Currently, this means that:
@@ -69,7 +66,6 @@ async fn main() -> anyhow::Result<()> {
6966
}
7067
stackable_operator::cli::Command::Run(SecretOperatorRun {
7168
csi_endpoint,
72-
node_name,
7369
privileged,
7470
common:
7571
ProductOperatorRun {
@@ -122,7 +118,7 @@ async fn main() -> anyhow::Result<()> {
122118
}))
123119
.add_service(NodeServer::new(SecretProvisionerNode {
124120
client: client.clone(),
125-
node_name,
121+
node_name: cluster_info_opts.kubernetes_node_name.to_owned(),
126122
privileged,
127123
}))
128124
.serve_with_incoming_shutdown(

tests/templates/kuttl/kerberos-ad/kinit-client.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
echo listing keytab contents
2222
klist -k /stackable/krb/keytab -teKC
2323
echo kiniting node
24-
kinit -kt /stackable/krb/keytab -p HTTP/$NODE_NAME
24+
kinit -kt /stackable/krb/keytab -p HTTP/$KUBERNETES_NODE_NAME
2525
echo kiniting service
2626
kinit -kt /stackable/krb/keytab -p HTTP/krb5-client.$NAMESPACE.svc.cluster.local
2727
echo kiniting pod
@@ -33,7 +33,7 @@ spec:
3333
valueFrom:
3434
fieldRef:
3535
fieldPath: metadata.name
36-
- name: NODE_NAME
36+
- name: KUBERNETES_NODE_NAME
3737
valueFrom:
3838
fieldRef:
3939
fieldPath: spec.nodeName

tests/templates/kuttl/kerberos/kinit-client.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
echo listing keytab contents
2121
klist -k /stackable/krb/keytab -teKC
2222
echo kiniting node
23-
kinit -kt /stackable/krb/keytab -p HTTP/$NODE_NAME
23+
kinit -kt /stackable/krb/keytab -p HTTP/$KUBERNETES_NODE_NAME
2424
echo kiniting node ip
2525
NODE_IP="$(cat /stackable/listener/nodeport-ip/default-address/address)"
2626
echo node ip is "$NODE_IP"
@@ -36,7 +36,7 @@ spec:
3636
valueFrom:
3737
fieldRef:
3838
fieldPath: metadata.name
39-
- name: NODE_NAME
39+
- name: KUBERNETES_NODE_NAME
4040
valueFrom:
4141
fieldRef:
4242
fieldPath: spec.nodeName

0 commit comments

Comments
 (0)