Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Missing RBAC permissions when ingress is enabled #49

Open
EppO opened this issue Apr 12, 2019 · 2 comments
Open

Missing RBAC permissions when ingress is enabled #49

EppO opened this issue Apr 12, 2019 · 2 comments

Comments

@EppO
Copy link

EppO commented Apr 12, 2019

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:

- apiGroups:
  - extensions
  resources:
  - ingresses
  verbs:
  - create
  - delete
  - patch
  - update
  - list

This should be set when you enable ingress in the cluster config otherwise the cluster won't start.

@croomes
Copy link
Contributor

croomes commented Apr 12, 2019

Thanks @EppO, good catch. We'll look at this on Monday.

@EppO
Copy link
Author

EppO commented Apr 12, 2019

Hostname doesn't look to be propagated as well. Ingress gets created without any host entry (just *)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants