kubevault / project

Enhancements & Issues for KubeVault
https://kubevault.com
Apache License 2.0
7 stars 0 forks source link

I am not able to add annotation for kube2iam role in vaultserver yaml file #68

Open pravinkumarb84 opened 5 years ago

pravinkumarb84 commented 5 years ago

Hi Folks, I am running vault-operator-0.2.0 and vault server in dev namespace. And I have created AWS polices for s3,kms and ssm access. How do i attach it to the vault server.yaml file. I have created a role attached to EC2 service and attached the policy to it. but still it is not able to find the resource.

apiVersion: kubevault.com/v1alpha1
kind: VaultServer
metadata:
  name: demo-vault
  namespace: dev1
  #annotations:
  #  iam.amazonaws.com/role: k8s-vault 
spec:
  serviceTemplate:
    metadata:
      annotations:
        iam.amazonaws.com/role: k8s-vault
  podTemplate:
    metadata:
      annotations:
        iam.amazonaws.com/role: k8s-vault
  nodes: 1
  version: "0.11.5"
  backend:
    s3:
      bucket: "demo-vault-3"
      region: "eu-west-1"
  unsealer:
    secretShares: 4
    secretThreshold: 2
    mode:
      awsKmsSsm:
        region: "eu-west-1"
        kmsKeyID: "my-kms-key"

Error from server (InternalError): error when creating "vaultserver.yaml": Internal error occurred: failed calling admission webhook "vaultservers.mutators.kubevault.com": the server could not find the requested resource