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

refactor(config): only require file argument #27

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

jbrockopp
Copy link
Contributor

No description provided.

@jbrockopp jbrockopp added the enhancement Indicates an improvement to a feature label Feb 20, 2020
@jbrockopp jbrockopp requested a review from a team as a code owner February 20, 2020 20:47
@jbrockopp jbrockopp self-assigned this Feb 20, 2020
@jbrockopp jbrockopp mentioned this pull request Feb 20, 2020
@codecov
Copy link

codecov bot commented Feb 20, 2020

Codecov Report

Merging #27 into master will decrease coverage by 0.89%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #27     +/-   ##
=========================================
- Coverage   51.35%   50.45%   -0.9%     
=========================================
  Files           8        8             
  Lines         333      327      -6     
=========================================
- Hits          171      165      -6     
  Misses        161      161             
  Partials        1        1
Impacted Files Coverage Δ
cmd/vela-kubernetes/config.go 100% <ø> (ø) ⬆️

@meinenec
Copy link

Is config file enough or should this be config file or the other checks?

@jbrockopp
Copy link
Contributor Author

jbrockopp commented Feb 20, 2020

@meinenec I believe the config file is enough by itself 👍 I'll elaborate a little further!

Here is a sample of a config file:

apiVersion: v1
kind: Config
preferences: {}

clusters:
- cluster:
    server:  <server>
  name: <cluster>

users:
- name: <user>
  user:
    token: <token>

contexts:
- context:
    cluster: <cluster>
    namespace: <namespace>
    user: <user>
  name: <content>
current-context: <context>

This file still works because the context, cluster etc. have already been set in that file 👍

The reason why we've added (and plan to add more) specific attributes to override the defaults set in the file (i.e. context, cluster etc.) is I'm assuming that some users of this plugin might have a config file with multiple objects already defined.

To which, they might like to customize which ones they're attempting to communicate with further beyond the current-context set in the config 😄

Eventually, I hope we can support the ability where we don't need to provide a file at all and can use this plugin with providing each attribute individually 🎉

@meinenec meinenec merged commit 9ee0546 into master Feb 20, 2020
@meinenec meinenec deleted the refactor/config/validate branch February 20, 2020 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates an improvement to a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants