When you enable ingress in the cluster definition:
apiVersion: "storageos.com/v1"
kind: StorageOSCluster
metadata:
name: "example-storageos"
spec:
secretRefName: "storageos-api" # Reference the Secret created in the previous step
secretRefNamespace: "storageos" # Namespace of the Secret
images:
nodeContainer: "storageos/node:1.1.5" # StorageOS version
resources:
requests:
memory: "512Mi"
csi:
enable: true
enableProvisionCreds: true
enableControllerPublishCreds: true
enableNodePublishCreds: true
ingress:
enable: true
hostname: storageos.mycluster.example.com
You get this error:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedCreation 0s (x3 over 2s) storageoscluster-operator failed to create Ingress: ingresses.extensions is forbidden: User "system:serviceaccount:storageos-operator:storageoscluster-operator-sa" cannot create resource "ingresses" in API group "extensions" in the namespace "storageos"
Adding this block to the ClusterRole storageos-operator does the trick:
When you enable ingress in the cluster definition:
You get this error:
Adding this block to the ClusterRole
storageos-operator
does the trick:This should be set when you enable ingress in the cluster config otherwise the cluster won't start.