Skip to content

Commit

Permalink
Merge pull request #19 from ctrox/cleanup
Browse files Browse the repository at this point in the history
Clean up old references to encryptionKey and fix up deployment
  • Loading branch information
ctrox authored May 18, 2019
2 parents b59a7f2 + a0902d8 commit 29c10b9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 60 deletions.
4 changes: 3 additions & 1 deletion deploy/kubernetes/attacher.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-attacher-sa
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -43,6 +43,7 @@ kind: Service
apiVersion: v1
metadata:
name: csi-attacher-s3
namespace: kube-system
labels:
app: csi-attacher-s3
spec:
Expand All @@ -56,6 +57,7 @@ kind: StatefulSet
apiVersion: apps/v1beta1
metadata:
name: csi-attacher-s3
namespace: kube-system
spec:
serviceName: "csi-attacher-s3"
replicas: 1
Expand Down
28 changes: 2 additions & 26 deletions deploy/kubernetes/csi-s3.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-s3
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -42,6 +42,7 @@ kind: DaemonSet
apiVersion: apps/v1beta2
metadata:
name: csi-s3
namespace: kube-system
spec:
selector:
matchLabels:
Expand Down Expand Up @@ -92,31 +93,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: accessKeyID
- name: SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: secretAccessKey
- name: S3_ENDPOINT
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: endpoint
- name: REGION
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: region
- name: ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: encryptionKey
imagePullPolicy: "Always"
volumeMounts:
- name: plugin-dir
Expand Down
29 changes: 3 additions & 26 deletions deploy/kubernetes/provisioner.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-provisioner-sa
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -42,6 +42,7 @@ kind: Service
apiVersion: v1
metadata:
name: csi-provisioner-s3
namespace: kube-system
labels:
app: csi-provisioner-s3
spec:
Expand All @@ -55,6 +56,7 @@ kind: StatefulSet
apiVersion: apps/v1beta1
metadata:
name: csi-provisioner-s3
namespace: kube-system
spec:
serviceName: "csi-provisioner-s3"
replicas: 1
Expand Down Expand Up @@ -91,31 +93,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: accessKeyID
- name: SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: secretAccessKey
- name: S3_ENDPOINT
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: endpoint
- name: REGION
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: region
- name: ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: csi-s3-secret
key: encryptionKey
imagePullPolicy: "Always"
volumeMounts:
- name: socket-dir
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion pkg/s3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ type Config struct {
Region string
Endpoint string
Mounter string
EncryptionKey string
}
1 change: 0 additions & 1 deletion pkg/s3/s3-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func newS3ClientFromSecrets(secrets map[string]string) (*s3Client, error) {
SecretAccessKey: secrets["secretAccessKey"],
Region: secrets["region"],
Endpoint: secrets["endpoint"],
EncryptionKey: secrets["encryptionKey"],
// Mounter is set in the volume preferences, not secrets
Mounter: "",
})
Expand Down
5 changes: 0 additions & 5 deletions test/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,23 @@ CreateVolumeSecret:
secretAccessKey: DSG643HGDS
endpoint: http://127.0.0.1:9000
region: ""
encryptionKey: ""
DeleteVolumeSecret:
accessKeyID: FJDSJ
secretAccessKey: DSG643HGDS
endpoint: http://127.0.0.1:9000
region: ""
encryptionKey: ""
NodeStageVolumeSecret:
accessKeyID: FJDSJ
secretAccessKey: DSG643HGDS
endpoint: http://127.0.0.1:9000
region: ""
encryptionKey: ""
NodePublishVolumeSecret:
accessKeyID: FJDSJ
secretAccessKey: DSG643HGDS
endpoint: http://127.0.0.1:9000
region: ""
encryptionKey: ""
ControllerValidateVolumeCapabilitiesSecret:
accessKeyID: FJDSJ
secretAccessKey: DSG643HGDS
endpoint: http://127.0.0.1:9000
region: ""
encryptionKey: ""

0 comments on commit 29c10b9

Please sign in to comment.