Secret and StorageClass Chart
This chart will install the following resources:
- A
Secretcontaining the Lightbits JWT. - A
StorageClassreferencing the secret and configured with all values needed to provision volumes on Lightbits.
Deploying the Secret And StorageClasses Workload
helm install \ --set storageclass.enabled=true \ --set global.storageClass.mgmtEndpoints="$MGMT_EP" \ --set global.jwtSecret.jwt="$LIGHTOS_JWT" \ lb-csi-workload-examples-sc \ lightbits-helm-repo/lb-csi-workload-examplesWill output:
NAME: lb-csi-workload-examples-scLAST DEPLOYED: Sun Feb 21 16:12:56 2021NAMESPACE: defaultSTATUS: deployedREVISION: 1TEST SUITE: NoneProvided is an example Secret created by helm:
# Source: lb-csi-workload-examples/templates/secret.yamlapiVersion: v1kind: Secretmetadata:name: example-secretnamespace: defaulttype: lightbitslabs.com/jwtdata:jwt: |-ZXlKaGJHY2lPaUpTVXpJMU5pSXNJbXRwWkNJNkluTjVjM1JsYlRweWIyOTBJaXdpZEhsd0lqb2lTbGRVSW4wLmV5SmhkV1FpT2lKTWFXZG9kRTlUSWl3aVpYaHdJam94TmpRMU5UQTNOemcyTENKcFlYUWlPakUyTVRNNU56RTNPRFlzSW1semN5STZJbk41YzNSbGMzUnpJaXdpYW5ScElqb2lhWFJ5UjNNMk1sTk1hMmxhY2xKdlNuWjNXazFhZHlJc0ltNWlaaUk2TVRZeE16azNNVGM0Tml3aWNtOXNaWE1pT2xzaWMzbHpkR1Z0T21Oc2RYTjBaWEl0WVdSdGFXNGlYU3dpYzNWaUlqb2liR2xuYUhSdmN5MWpiR2xsYm5RaWZRLlc5QXMwdTJQZnFudTIzZ3U0YXFYcTBKMXZETUJ6bkVfT3dkZkxGeEgzMUdZZVAxWHFqbUNLUWlZS3pJcXlmcTgweTdCZC02azZvZlVXbzlRZ0FDb1J6LUhRWTJjc1pYdHVHTGRpRzN3YUF3aEs3QjRIQnhROFAzSnpSeno4TzJLOVg1Z3dRY19xYnpjYTBNaUlrWTZVVjVTOWNEMTROTHNQRExwUjdvOFRMbFozbm9kSDZiRlNNVjlPeF9GRXBvTGVidzRWLUlvaURiTV9NdTFDSzZCOUJGeFpNRTV6NmJIMXlkSDZFWnRuUFlRaUVrRVdlUzFHMUJSTVNfR0hGN3Nja2NYU0c3Q1pkSFFqOHY1b0Y1YS1USHNVdXR0dmFIc1hUS3FzREFkOHRvbEphZUNUN0NWRFFHX0xUQ1hYZ3dudUI3c0ZRaHJHbHhRMkw3V3BlNzczdw==The chart will validate that the required fields are provided. If they are not provided, an error will be presented.
For example, if global.jwtSecret.jwt is not provided, you will get the following error:
Error: execution error at (lb-csi-workload-examples/charts/storageclass/templates/secret.yaml:1:85): global.jwtSecret.jwt field is required
Verifying the Secret And StorageClasses Workload
Verify that all resources were created:
x
kubectl get sc,secretNAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGEstorageclass.storage.k8s.io/example-sc csi.lightbitslabs.com Delete Immediate true 5m27sNAME TYPE DATA AGEsecret/example-secret lightbitslabs.com/jwt 1 5m27sUninstalling the Secret And StorageClasses Workload
Once done with deployment examples, you can delete storageclass resources.
helm uninstall lb-csi-workload-examples-screlease "lb-csi-workload-examples-sc" uninstalledWas this page helpful?