Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
operator: OpenShift support
Browse files Browse the repository at this point in the history
On OpenShift we can use automatically generated certificates and have
to use http for the scheduler extender. The scheduler extender and API
webhooks then need services with different settings, therefore we now
configure them separately.

While at it, the formatting of the operator API documentation gets
enhanced (remove unnecessary indention, odd placement of note).

On 1.20, the operator testing still used the scheduler extensions
whereas the YAML files didn't. Now both stop using them, for the sake
of consistency.
  • Loading branch information
pohly committed Jul 15, 2021
1 parent 048767a commit 91601ed
Show file tree
Hide file tree
Showing 47 changed files with 566 additions and 111 deletions.
4 changes: 3 additions & 1 deletion deploy/crd/pmem-csi.intel.com_pmemcsideployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ spec:
description: ControllerTLSSecret is the name of a secret which contains
ca.crt, tls.crt and tls.key data for the scheduler extender and
pod mutation webhook. A controller is started if (and only if) this
secret is specified.
secret is specified. The special string "-openshift-" enables the
usage of https://docs.openshift.com/container-platform/4.6/security/certificates/service-serving-certificate.html
to create certificates.
type: string
deviceMode:
description: DeviceMode to use to manage PMEM devices.
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/direct/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/direct/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/lvm/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/lvm/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/pmem-csi-direct-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/pmem-csi-direct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/pmem-csi-lvm-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.19/pmem-csi-lvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/direct/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/direct/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/lvm/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/lvm/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/pmem-csi-direct-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/pmem-csi-direct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/pmem-csi-lvm-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.20/pmem-csi-lvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/direct/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/direct/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/lvm/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/lvm/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/pmem-csi-direct-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/pmem-csi-direct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/pmem-csi-lvm-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes-1.21/pmem-csi-lvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ spec:
- -mode=webhooks
- -drivername=$(PMEM_CSI_DRIVER_NAME)
- -nodeSelector={"storage":"pmem"}
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
2 changes: 1 addition & 1 deletion deploy/kustomize/driver/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ spec:
- -nodeSelector={"storage":"pmem"}
# ca.crt is present in pmem-csi-intel-com-controller-secret but not required for anything at
# the moment.
- -caFile=/certs/ca.crt
- -caFile=
- -certFile=/certs/tls.crt
- -keyFile=/certs/tls.key
- -schedulerListen=:8000
Expand Down
1 change: 1 addition & 0 deletions deploy/kustomize/webhook/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
resources:
- webhook.yaml
- webhook-service.yaml
12 changes: 12 additions & 0 deletions deploy/kustomize/webhook/webhook-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: pmem-csi-intel-com-webhook
namespace: pmem-csi
spec:
selector:
app.kubernetes.io/name: pmem-csi-controller
app.kubernetes.io/instance: pmem-csi.intel.com
ports:
- targetPort: 8000
port: 443
2 changes: 1 addition & 1 deletion deploy/kustomize/webhook/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ webhooks:
admissionReviewVersions: ["v1"]
clientConfig:
service:
name: pmem-csi-intel-com-scheduler
name: pmem-csi-intel-com-webhook
namespace: pmem-csi
path: /pod/mutate
caBundle:
Expand Down
1 change: 1 addition & 0 deletions deploy/yamls.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
//go:embed kubernetes-*/*/pmem-csi.yaml
//go:embed kustomize/webhook/webhook.yaml
//go:embed kustomize/scheduler/scheduler-service.yaml
//go:embed kustomize/webhook/webhook-service.yaml
var assets embed.FS

// YamlFile contains all objects of a certain deployment.
Expand Down
Loading

0 comments on commit 91601ed

Please sign in to comment.