Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSI driver GitOps Blog Edits #246

Merged
merged 13 commits into from
Apr 9, 2024

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In order to sucessfully install the VMware CSI Driver, the following items must
1. Creation of the `ClusterSecretStore` Kubernetes resource detailed in the eks-anywhere-addons/README.md file

2. Creation of config secrets in AWS Secrets Manager that External secrets will reference in the
vsphere-csi-externalsecrets.yaml file.
vsphere-external-secrets.yaml file.

# Creation of the Config Secrets

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: vmware-csi-namespace-kustomization
namespace: flux-system
labels:
app: vmware-csi-driver
spec:
interval: 1m0s
path: ./eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vmware-csi-namespace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need 3 Kustomizations for Ordering?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it end to end and confirmed it works, I can test again if we'd like screenshots.

3 Kustomizations to enforce ordering was to ensure the driver would deploy after the secrets because immutability of the deployment was causing it to fail if the secret took longer than the driver. I did enable restarts however after creating this order enforcement so I'll test to see if we can simplify it with that enabled when I re-test for screenshots

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes lets get some screenshots to PR. Its lot changes so we want to make sure we document the outputs.

prune: true
sourceRef:
kind: GitRepository
name: addons
healthChecks:
- apiVersion: v1
kind: Namespace
name: vmware-system-csi
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: vmware-csi-secrets-kustomization
namespace: flux-system
labels:
app: vmware-csi-driver
spec:
dependsOn:
- name: vmware-csi-namespace-kustomization
interval: 1m0s
path: ./eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vmware-csi-secrets
prune: true
sourceRef:
kind: GitRepository
name: addons
healthChecks:
- apiVersion: v1
kind: Secret
name: vsphere.conf
namespace: kube-system
- apiVersion: v1
kind: Secret
name: vsphere-config-secret
namespace: vmware-system-csi
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: vmware-csi-driver-kustomization
namespace: flux-system
labels:
app: vmware-csi-driver
spec:
dependsOn:
- name: vmware-csi-secrets-kustomization
interval: 1m0s
path: ./eks-anywhere-vsphere/Addons/Core/storage-driver/vmware-csi/vmware-csi-manifests
prune: true
sourceRef:
kind: GitRepository
name: addons
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ metadata:
labels:
component: cloud-controller-manager
tier: control-plane
kustomize.toolkit.fluxcd.io/force: enabled
namespace: kube-system
spec:
selector:
Expand Down Expand Up @@ -204,4 +205,4 @@ spec:
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
operator: Exists
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ spec:
volumeMounts:
- mountPath: /csi
name: socket-dir
volumes:
volumes:
- name: vsphere-config-volume
secret:
secretName: vsphere-config-secret
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: test-app
Expand All @@ -9,10 +9,10 @@ spec:
kind: GitRepository
name: addons
namespace: flux-system
interval: 5m0s
interval: 1m0s
prune: true
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: snapshot
Expand All @@ -25,22 +25,5 @@ spec:
kind: GitRepository
name: addons
namespace: flux-system
interval: 5m0s
interval: 1m0s
prune: true
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: snapshot-restore
namespace: flux-system
spec:
dependsOn:
- name: snapshot
path: "./eks-anywhere-vsphere/Testers/Core/snapshot-tester/snapshot-restore"
sourceRef:
kind: GitRepository
name: addons
namespace: flux-system
interval: 5m0s
prune: true
---

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: vmware-csi-snapshotclass
driver: csi.vsphere.vmware.com
deletionPolicy: Delete
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: openebs-volume-snapshot
name: vmware-csi-volume-snapshot
namespace: default
spec:
volumeSnapshotClassName: csi-cstor-snapshotclass
volumeSnapshotClassName: vmware-csi-snapshotclass
source:
persistentVolumeClaimName: openebs-claim
persistentVolumeClaimName: vmware-csi-claim
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: openebs-claim
name: vmware-csi-claim
namespace: default
spec:
accessModes:
- ReadWriteOnce
storageClassName: openebs-csi-cstor-sparse
storageClassName: vmware-sc
resources:
requests:
storage: 4Gi

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ spec:
volumes:
- name: persistent-storage
persistentVolumeClaim:
claimName: openebs-claim
claimName: vmware-csi-claim
Loading