Fix ci and add sa name tp the job
This commit is contained in:
parent
46cfcd8c7d
commit
792c90c672
@ -27,8 +27,7 @@ steps:
|
|||||||
exclude:
|
exclude:
|
||||||
- main
|
- main
|
||||||
commands:
|
commands:
|
||||||
- kubectl config view
|
- yq
|
||||||
- kubectl cluster-info
|
|
||||||
- helmfile -e "${ENV}" diff
|
- helmfile -e "${ENV}" diff
|
||||||
diff:
|
diff:
|
||||||
!!merge <<: *opts
|
!!merge <<: *opts
|
||||||
|
12
scripts/get_kubeconfig_from_sa.sh
Normal file → Executable file
12
scripts/get_kubeconfig_from_sa.sh
Normal file → Executable file
@ -1,13 +1,15 @@
|
|||||||
# The script returns a kubeconfig for the ServiceAccount given
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
# you need to have kubectl on PATH with the context set to the cluster you want to create the config for
|
# you need to have kubectl on PATH with the context set to the cluster you want to create the config for
|
||||||
|
|
||||||
# Cosmetics for the created config
|
# Cosmetics for the created config
|
||||||
clusterName='some-cluster'
|
clusterName="${CLUSTER_NAME}"
|
||||||
# your server address goes here get it via `kubectl cluster-info`
|
# your server address goes here get it via `kubectl cluster-info`
|
||||||
server='https://157.90.17.72:6443'
|
server="${CLUSTER_URL}"
|
||||||
# the Namespace and ServiceAccount name that is used for the config
|
# the Namespace and ServiceAccount name that is used for the config
|
||||||
namespace='kube-system'
|
export namespace='pipelines'
|
||||||
serviceAccount='developer'
|
export serviceAccount='woodpecker-ci'
|
||||||
|
|
||||||
# The following automation does not work from Kubernetes 1.24 and up.
|
# The following automation does not work from Kubernetes 1.24 and up.
|
||||||
# You might need to
|
# You might need to
|
||||||
|
Loading…
Reference in New Issue
Block a user