-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from ashanaakh/kube-token
Added kubernetes token support
- Loading branch information
Showing
2 changed files
with
60 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Kite concourse resource | ||
|
||
When you define kite resource you should defind `kubeconfig` or kite can generate it from defined `token`, `endpoint`, `user`, `cluster`, `certificate-authority` parameters. | ||
|
||
Here is description of parameters: | ||
- __token__ - service account token for your cluster | ||
- __endpoint__ - cluster server adress | ||
- __certificate-autority__ - service account certificate for cluster | ||
|
||
### Where to get this parameters ? | ||
|
||
Get secret's name | ||
```shell | ||
kubectl get serviceAccount <service_account_name> -oyaml | ||
echo -n SECRET | base64 -d | ||
``` | ||
|
||
Then look on secret's yaml. Here you can find certificate-authority and token values: | ||
```shell | ||
kubectl get secrets <secrets_name> -oyaml | ||
echo -n SECRET | base64 -d | ||
``` | ||
|
||
Find server address: | ||
```shell | ||
kubectl config view | ||
``` | ||
|
||
*Example* | ||
|
||
```yaml | ||
resource_types: | ||
- name: kite | ||
type: docker-image | ||
source: | ||
repository: heliostech/kite | ||
|
||
resources: | ||
- name: kite-test | ||
type: kite | ||
source: | ||
token: {{sa_token}} | ||
endpoint: {{server_ip}} | ||
certificate-autority: {{certificate-autority}} | ||
``` |