Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added kubernetes token support #101

Merged
merged 3 commits into from
Dec 14, 2017
Merged

Added kubernetes token support #101

merged 3 commits into from
Dec 14, 2017

Conversation

shal
Copy link
Contributor

@shal shal commented Nov 22, 2017

Added parameters to concourse kite-resource for generating kubeconfig

@codecov-io
Copy link

codecov-io commented Nov 22, 2017

Codecov Report

Merging #101 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #101   +/-   ##
=======================================
  Coverage   35.07%   35.07%           
=======================================
  Files          18       18           
  Lines         499      499           
=======================================
  Hits          175      175           
  Misses        324      324

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75ef947...82d5cb1. Read the comment docs.

Copy link
Member

@calj calj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Can you add some documentation for new parameters?

@shal
Copy link
Contributor Author

shal commented Nov 30, 2017

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, that kite needs to generate kubeconfig:

  • token - service account token for your cluster
  • endpoint - cluster server adress
  • cluster - name of cluster
  • user - username
  • certificate-autority - service account certificate for cluster

Where to get this parameters ?

Get secret's name

kubectl get serviceAccount <service_account_name> -oyaml

Then look on secret's yaml. Here you can find certificate-authority and token values:

kubectl get secrets <secrets_name> -oyaml

Get cluste's name:

kubectl config current-context

Find server address:

kubectl config view

Example

resource_types:
  - name: kite
    type: docker-image
    source:
      repository: heliostech/kite

resources:
  - name: kite-test
    type: kite
    source:
      json_key: {{gcp_service_account_key}}
      token: {{sa_token}}
      endpoint: {{server_ip}}
      cluster: {{cluster_name}}
      name: {{username}}
      certificate-autority: {{certificate-autority}}

@shal
Copy link
Contributor Author

shal commented Nov 30, 2017

@calj @mod Actually, we have some kind of error with kite concourse resource:
json: cannot unmarshal object into Go value of type []atc.Version
So I can't test this patch, I need to find the problem.

@calj calj merged commit 48517e4 into openware:master Dec 14, 2017
@shal shal deleted the kube-token branch December 26, 2017 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants