-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added E2E Tests Scenarios for Authorization upgrade (#559)
- Loading branch information
1 parent
25ebf1e
commit fdf6e36
Showing
5 changed files
with
350 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
tests/e2e/testfiles/authorization-templates/csm_authorization_proxy_server_n_minus_1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
apiVersion: storage.dell.com/v1 | ||
kind: ContainerStorageModule | ||
metadata: | ||
name: authorization | ||
namespace: authorization | ||
spec: | ||
modules: | ||
# Authorization: enable csm-authorization proxy server for RBAC | ||
- name: authorization-proxy-server | ||
# enable: Enable/Disable csm-authorization | ||
enabled: true | ||
configVersion: v1.9.1 | ||
forceRemoveModule: true | ||
components: | ||
- name: karavi-authorization-proxy-server | ||
# enable: Enable/Disable csm-authorization proxy server | ||
enabled: true | ||
proxyService: dellemc/csm-authorization-proxy:v1.9.1 | ||
tenantService: dellemc/csm-authorization-tenant:v1.9.1 | ||
roleService: dellemc/csm-authorization-role:v1.9.1 | ||
storageService: dellemc/csm-authorization-storage:v1.9.1 | ||
redis: redis:6.0.8-alpine | ||
commander: rediscommander/redis-commander:latest | ||
opa: openpolicyagent/opa | ||
opaKubeMgmt: openpolicyagent/kube-mgmt:0.11 | ||
envs: | ||
# base hostname for the ingress rules that expose the services | ||
# the proxy-server ingress will use this hostname | ||
# Allowed values: string | ||
# Default value: csm-authorization.com | ||
- name: "PROXY_HOST" | ||
value: "csm-authorization.com" | ||
|
||
# Proxy-service ingress configuration | ||
# Default value: nginx | ||
- name: "PROXY_INGRESS_CLASSNAME" | ||
value: "nginx" | ||
# An additional host rule for the proxy-server ingress | ||
# Default value: authorization-ingress-nginx-controller.namespace.svc.cluster.local | ||
- name: "PROXY_INGRESS_HOST" | ||
value: "authorization-ingress-nginx-controller.authorization.svc.cluster.local" | ||
|
||
# Specify storage class for redis. Otherwise, default storage class is used. | ||
# Default value: None | ||
- name: "REDIS_STORAGE_CLASS" | ||
value: "local-storage" | ||
|
||
# enabled: Enable/Disable nginx ingress | ||
# Allowed values: | ||
# true: enable deployment of nginx ingress controller | ||
# false: disable deployment of nginx ingress only if you have your own ingress controller | ||
# Default value: true | ||
- name: ingress-nginx | ||
enabled: true | ||
|
||
# enabled: Enable/Disable cert-manager | ||
# Allowed values: | ||
# true: enable deployment of cert-manager | ||
# false: disable deployment of cert-manager only if it's already deployed | ||
# Default value: true | ||
- name: cert-manager | ||
enabled: true | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: csm-config-params | ||
namespace: authorization | ||
data: | ||
csm-config-params.yaml: | | ||
CONCURRENT_POWERFLEX_REQUESTS: 10 | ||
LOG_LEVEL: debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
skipCertificateValidation: true | ||
isDefault: true | ||
mdm: REPLACE_MDM | ||
nasName: "none" | ||
|
151 changes: 151 additions & 0 deletions
151
tests/e2e/testfiles/storage_csm_powerflex_auth_driver_only_upgrade.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
apiVersion: storage.dell.com/v1 | ||
kind: ContainerStorageModule | ||
metadata: | ||
name: test-vxflexos | ||
namespace: test-vxflexos | ||
spec: | ||
driver: | ||
csiDriverType: "powerflex" | ||
csiDriverSpec: | ||
# fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. | ||
# Allowed values: ReadWriteOnceWithFSType, File , None | ||
# Default value: ReadWriteOnceWithFSType | ||
fSGroupPolicy: "File" | ||
configVersion: v2.10.0 | ||
replicas: 1 | ||
dnsPolicy: ClusterFirstWithHostNet | ||
forceUpdate: false | ||
forceRemoveDriver: true | ||
common: | ||
image: "dellemc/csi-vxflexos:nightly" | ||
imagePullPolicy: Always | ||
envs: | ||
- name: X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT | ||
value: "false" | ||
- name: X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE | ||
value: "false" | ||
- name: X_CSI_DEBUG | ||
value: "true" | ||
- name: X_CSI_ALLOW_RWO_MULTI_POD_ACCESS | ||
value: "false" | ||
# Specify kubelet config dir path. | ||
# Ensure that the config.yaml file is present at this path. | ||
# Default value: None | ||
- name: KUBELET_CONFIG_DIR | ||
value: "/var/lib/kubelet" | ||
- name: "CERT_SECRET_COUNT" | ||
value: "0" | ||
|
||
|
||
sideCars: | ||
# sdc-monitor is disabled by default, due to high CPU usage | ||
- name: sdc-monitor | ||
enabled: false | ||
image: dellemc/sdc:4.5.1 | ||
envs: | ||
- name: HOST_PID | ||
value: "1" | ||
- name: MDM | ||
value: "10.225.109.64,10.225.109.65" #provide MDM value | ||
|
||
# health monitor is disabled by default, refer to driver documentation before enabling it | ||
# Also set the env variable controller.envs.X_CSI_HEALTH_MONITOR_ENABLED to "true". | ||
- name: csi-external-health-monitor-controller | ||
enabled: false | ||
args: ["--monitor-interval=60s"] | ||
|
||
controller: | ||
envs: | ||
# X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. | ||
# Install the 'external-health-monitor' sidecar accordingly. | ||
# Allowed values: | ||
# true: enable checking of health condition of CSI volumes | ||
# false: disable checking of health condition of CSI volumes | ||
# Default value: false | ||
- name: X_CSI_HEALTH_MONITOR_ENABLED | ||
value: "false" | ||
|
||
#"controller.nodeSelector" defines what nodes would be selected for pods of controller deployment | ||
# Leave as blank to use all nodes | ||
# Allowed values: map of key-value pairs | ||
# Default value: None | ||
# Examples: | ||
# node-role.kubernetes.io/control-plane: "" | ||
nodeSelector: | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint | ||
# node-role.kubernetes.io/master: "" | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint | ||
# node-role.kubernetes.io/control-plane: "" | ||
|
||
# "controller.tolerations" defines tolerations that would be applied to controller deployment | ||
# Leave as blank to install controller on worker nodes | ||
# Default value: None | ||
tolerations: | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint | ||
# - key: "node-role.kubernetes.io/master" | ||
# operator: "Exists" | ||
# effect: "NoSchedule" | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint | ||
# - key: "node-role.kubernetes.io/control-plane" | ||
# operator: "Exists" | ||
# effect: "NoSchedule" | ||
|
||
node: | ||
envs: | ||
# X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage | ||
# Allowed values: | ||
# true: enable checking of health condition of CSI volumes | ||
# false: disable checking of health condition of CSI volumes | ||
# Default value: false | ||
- name: X_CSI_HEALTH_MONITOR_ENABLED | ||
value: "false" | ||
|
||
# "node.nodeSelector" defines what nodes would be selected for pods of node daemonset | ||
# Leave as blank to use all nodes | ||
# Allowed values: map of key-value pairs | ||
# Default value: None | ||
# Examples: | ||
# node-role.kubernetes.io/control-plane: "" | ||
nodeSelector: | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint | ||
# node-role.kubernetes.io/master: "" | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint | ||
# node-role.kubernetes.io/control-plane: "" | ||
|
||
# "node.tolerations" defines tolerations that would be applied to node daemonset | ||
# Leave as blank to install node driver only on worker nodes | ||
# Default value: None | ||
tolerations: | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint | ||
# - key: "node-role.kubernetes.io/master" | ||
# operator: "Exists" | ||
# effect: "NoSchedule" | ||
# Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint | ||
# - key: "node-role.kubernetes.io/control-plane" | ||
# operator: "Exists" | ||
# effect: "NoSchedule" | ||
|
||
initContainers: | ||
- image: dellemc/sdc:4.5.1 | ||
imagePullPolicy: IfNotPresent | ||
name: sdc | ||
envs: | ||
- name: MDM | ||
value: "10.x.x.x,10.x.x.x" #provide MDM value | ||
modules: | ||
# Authorization: enable csm-authorization for RBAC | ||
- name: authorization | ||
# enable: Enable/Disable csm-authorization | ||
enabled: true | ||
configVersion: v1.9.1 | ||
components: | ||
- name: karavi-authorization-proxy | ||
image: dellemc/csm-authorization-sidecar:v1.9.1 | ||
envs: | ||
# proxyHost: hostname of the csm-authorization server | ||
- name: "PROXY_HOST" | ||
value: "authorization-ingress-nginx-controller.authorization.svc.cluster.local" | ||
|
||
# skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server | ||
- name: "SKIP_CERTIFICATE_VALIDATION" | ||
value: "true" |
Oops, something went wrong.