Fix image name for example webhook, and other nitpicks

Also bump example container versions to v3.0.0, and use
k8s.gcr.io/sig-storage instead of quay.io/k8scsi.
This commit is contained in:
Ben Swartzlander
2020-09-22 09:52:56 -04:00
parent 28abcf95d1
commit a2666d1ea9
6 changed files with 9 additions and 10 deletions

View File

@@ -72,7 +72,7 @@ spec:
serviceAccount: csi-snapshotter serviceAccount: csi-snapshotter
containers: containers:
- name: csi-provisioner - name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.5.0 image: k8s.gcr.io/sig-storage/csi-provisioner:v2.0.2
args: args:
- "--v=5" - "--v=5"
- "--csi-address=$(ADDRESS)" - "--csi-address=$(ADDRESS)"
@@ -84,7 +84,7 @@ spec:
- name: socket-dir - name: socket-dir
mountPath: /csi mountPath: /csi
- name: csi-snapshotter - name: csi-snapshotter
image: quay.io/k8scsi/csi-snapshotter:canary image: k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.0
args: args:
- "--v=5" - "--v=5"
- "--csi-address=$(ADDRESS)" - "--csi-address=$(ADDRESS)"
@@ -97,7 +97,7 @@ spec:
- name: socket-dir - name: socket-dir
mountPath: /csi mountPath: /csi
- name: hostpath - name: hostpath
image: quay.io/k8scsi/hostpathplugin:v1.2.0 image: k8s.gcr.io/sig-storage/hostpathplugin:v1.4.0
args: args:
- "--v=5" - "--v=5"
- "--endpoint=$(CSI_ENDPOINT)" - "--endpoint=$(CSI_ENDPOINT)"

View File

@@ -25,7 +25,7 @@ spec:
serviceAccount: snapshot-controller serviceAccount: snapshot-controller
containers: containers:
- name: snapshot-controller - name: snapshot-controller
image: quay.io/k8scsi/snapshot-controller:canary image: k8s.gcr.io/sig-storage/snapshot-controller:v3.0.0
args: args:
- "--v=5" - "--v=5"
- "--leader-election=false" - "--leader-election=false"

View File

@@ -23,7 +23,7 @@ make
Build the docker image Build the docker image
```bash ```bash
docker build -t validation-webhook:latest -f ./cmd/validation-webhook/Dockerfile . docker build -t snapshot-validation-webhook:latest -f ./cmd/validation-webhook/Dockerfile .
``` ```
## How to deploy the webhook ## How to deploy the webhook
@@ -78,4 +78,4 @@ Look into [cert-manager](https://cert-manager.io/) to handle the certificates, a
#### Important #### Important
Please see the deployment [yaml](./webhook.yaml) for the arguments expected by the webhook server. The snapshot validation webhook is served at the path `/snapshot`. Please see the deployment [yaml](./webhook.yaml) for the arguments expected by the webhook server. The snapshot validation webhook is served at the path `/volumesnapshot`.

View File

@@ -2,7 +2,6 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration kind: ValidatingWebhookConfiguration
metadata: metadata:
name: "validation-webhook.snapshot.storage.k8s.io" name: "validation-webhook.snapshot.storage.k8s.io"
namespace: "default"
webhooks: webhooks:
- name: "validation-webhook.snapshot.storage.k8s.io" - name: "validation-webhook.snapshot.storage.k8s.io"
rules: rules:

View File

@@ -122,5 +122,5 @@ echo ${serverCert} | openssl base64 -d -A -out ${tmpdir}/server-cert.pem
kubectl create secret generic ${secret} \ kubectl create secret generic ${secret} \
--from-file=key.pem=${tmpdir}/server-key.pem \ --from-file=key.pem=${tmpdir}/server-key.pem \
--from-file=cert.pem=${tmpdir}/server-cert.pem \ --from-file=cert.pem=${tmpdir}/server-cert.pem \
--dry-run -o yaml | --dry-run=client -o yaml |
kubectl -n ${namespace} apply -f - kubectl -n ${namespace} apply -f -

View File

@@ -17,7 +17,7 @@ spec:
spec: spec:
containers: containers:
- name: snapshot-validation - name: snapshot-validation
image: k8s.gcr.io/sig-storage/validation-webhook:v2.2.0 # change the image if you wish to use your own custom validation server image image: k8s.gcr.io/sig-storage/snapshot-validation-webhook:v3.0.0 # change the image if you wish to use your own custom validation server image
args: ['--tls-cert-file=/etc/snapshot-validation-webhook/certs/cert.pem', '--tls-private-key-file=/etc/snapshot-validation-webhook/certs/key.pem'] args: ['--tls-cert-file=/etc/snapshot-validation-webhook/certs/cert.pem', '--tls-private-key-file=/etc/snapshot-validation-webhook/certs/key.pem']
ports: ports:
- containerPort: 443 # change the port as needed - containerPort: 443 # change the port as needed