diff --git a/.drone.yml b/.drone.yml index 26a4eaf..858d9e4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -61,10 +61,10 @@ steps: kubernetes_token: from_secret: kubectl_token commands: - - kubectl get pods - - kubectl get deployments - - kubectl get svc - - kubectl apply -f kube/beer-deployment.yaml + - kubectl get pods --namespace=beer + - kubectl get deployments --namespace=beer + - kubectl get svc --namespace=beer + - kubectl apply -f kube/beer-deployment.yaml --namespace=beer depends_on: - build diff --git a/kube/beer-namespace.yaml b/kube/beer-namespace.yaml index bfc4951..119770a 100644 --- a/kube/beer-namespace.yaml +++ b/kube/beer-namespace.yaml @@ -5,4 +5,3 @@ metadata: name: beer labels: name: beer - diff --git a/kube/beer-serviceaccount.yaml b/kube/beer-serviceaccount.yaml index e028118..3b1f745 100644 --- a/kube/beer-serviceaccount.yaml +++ b/kube/beer-serviceaccount.yaml @@ -10,7 +10,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: beer-deploy-role - namespace: beer # Should be namespace you are granting access to + namespace: beer rules: - apiGroups: ["*"] resources: ["*"] @@ -29,13 +29,3 @@ subjects: - namespace: beer kind: ServiceAccount name: beer-deploy - -#--- -#ApiVersion: v1 -#Kind: Secret -#Metadata: -# name: beer-deploy-secret -# annotations: -# kubernetes.io/service-account.name: beer-deploy -#Type: kubernetes.io/service-account-token -