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

Feature: Support regex in profile activation via kubeContext #1677

Closed
dkirrane opened this issue Feb 20, 2019 · 2 comments
Closed

Feature: Support regex in profile activation via kubeContext #1677

dkirrane opened this issue Feb 20, 2019 · 2 comments
Labels
area/profiles good first issue Good for newcomers help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/feature-request

Comments

@dkirrane
Copy link

It would be good to auto-activate a Skaffold profile based on a kubeContext regex.

e.g. My clusters (both gke & on-prem) have names like the following:

  • gke_my-team_europe-west2-a_my-dev-cluster
  • gke_my-team_europe-west2-a_my-sanity-cluster
  • kubernetes-admin@dev
  • kubernetes-admin@sanity

I want to run the gke profile below when my kube context matches a GKE cluster name (using regex gke.*)

apiVersion: skaffold/v1beta5
kind: Config
.
.
.
profiles:
  - name: gke
    build:
      artifacts:
        - image: eu.gcr.io/my-team/my-app
          jibMaven: {}
    activation:
      - kubeContext: "gke.*"
@nkubala nkubala added good first issue Good for newcomers help wanted We would love to have this done, but don't have the bandwidth, need help from contributors labels Mar 26, 2019
@charlyx
Copy link
Contributor

charlyx commented May 3, 2019

kubeContext actually supports "equals" AND "not equals" by prefixing with !.
Shall we add a kubeContextRegexp so we don't mix things with current behaviour?

@dgageot
Copy link
Contributor

dgageot commented Jul 8, 2019

Fixed with #2065

@dgageot dgageot closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/profiles good first issue Good for newcomers help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/feature-request
Projects
None yet
Development

No branches or pull requests

5 participants