Skip to content

Commit

Permalink
Fixing typo and adding env var to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrainer committed Jun 15, 2022
1 parent 508e547 commit ad59768
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
- name: AWS_STS_REGIONAL_ENDPOINTS
value: regional
{{- end }}
- name: CSI_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand Down
4 changes: 4 additions & 0 deletions deploy/kubernetes/base/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ spec:
env:
- name: CSI_ENDPOINT
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: CSI_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/k8s_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type kubernetesApiMetadataProvider struct {
func (k kubernetesApiMetadataProvider) getMetadata() (MetadataService, error) {
nodeName := os.Getenv("CSI_NODE_NAME")
if nodeName == "" {
return nil, fmt.Errorf("CST_NODE_NAME env var not set")
return nil, fmt.Errorf("CSI_NODE_NAME env var not set")
}

node, err := k.api.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{})
Expand Down

0 comments on commit ad59768

Please sign in to comment.