Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

Add 'kubeconfig_file' param into the out params #18

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

superbrothers
Copy link
Contributor

The kubeconfig_file is a new out param, which is the path of
kubeconfig file. With this param, we can use any remote kubeconfig file
which is fetched by other resources like s3-resource.

This param has priority over the kubeconfig of source configuration.

Example: Use a remote kubeconfig file fetched by s3-resource

resources:
- name: k8s-prod
  type: kubernetes

- name: kubeconfig-file
  type: s3
  source:
    bucket: mybucket
    versioned_file: config
    access_key_id: ((s3-access-key))
    secret_access_key: ((s3-secret))

- name: my-app
  type: git
  source:
    ...

jobs:
- name: k8s-deploy-prod
  plan:
  - aggregate:
    - get: my-app
      trigger: true
    - get: kubeconfig-file
  - put: k8s-prod
    params:
      kubectl: apply -f my-app/k8s -f my-app/k8s/production
      wait_until_ready_selector: app=myapp
      kubeconfig_file: kubeconfig-file/config # <--- A new param here

Closes #16

The `kubeconfig_file` is a new out param, which is the path of
kubeconfig file. With this param, we can use any remote kubeconfig file
which is fetched by other resources like s3-resource.

This param has priority over the `kubeconfig` of source configuration.
@superbrothers superbrothers requested review from inajob and tksm January 25, 2018 09:21
Copy link
Member

@tksm tksm left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link

@inajob inajob left a comment

Choose a reason for hiding this comment

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

LGTM

@superbrothers superbrothers merged commit 79bb001 into master Jan 26, 2018
@superbrothers superbrothers deleted the kubeconfig_file branch January 26, 2018 07:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants