-
Notifications
You must be signed in to change notification settings - Fork 175
Add --omit-component as inverse of --component #882
Comments
As I am getting down the path of doing blue/green deployments with spinnaker using the kubernetes manifest created by ksonnet and saved in github which triggers my pipeline, it is becoming more obvious that we need to pick and choose components for deployment at different stages. Therefore this kind of functionality is pretty critical. For example, to accomplish blue/green deployment, I want to generate versioned deployments and matching version services, but I want the spinnaker pipeline to spin up the deployments and check the success first, then finally apply the versioned services change. If no good, apply the old versioned services manifest. Anyway, I've got this covered in my wrapper right now but wanted to add a note that I'm finding this functionality useful/critical. |
I've now added filtering by Example: #!/usr/bin/env bash
set -e
MANIFESTS=${BASH_SOURCE%/*}/./environments/$1/manifests
rm -rf ${MANIFESTS} && mkdir ${MANIFESTS}
FILE=${MANIFESTS}/crt.yml
./show "$@" --module cert-manager > ${FILE}
FILE=${MANIFESTS}/app.yml
./show "$@" --module app --omit-component app.dbmigrate > ${FILE}
FILE=${MANIFESTS}dbmigrate.yml
./show "$@" --component app.dbmigrate > ${FILE}
FILE=${MANIFESTS}/inf.yml
./show "$@" --module traefik --module spinnaker > ${FILE} |
@rosskevin in the meantime i'm going to include conditionals:
|
Is this a BUG REPORT or FEATURE REQUEST?:
/kind feature
What happened:
Cannot
--omit-component
with any command, but you can include one with--component
What you expected to happen:
Should be able to
omit
if the goal is to support full stack deployments, and it is the companion/inverse of--component
How to reproduce it (as minimally and precisely as possible):
ks show foo --component app.dbMigrate
great! get just the migrate job manifestks show foo --omit-component app.dbMigrate
ouch! I need everything but theapp.dbMigrate
componentAnything else we need to know?:
dbMigrate
component is setup virtually identical to the rest of our components such asapi
andsidekiq
, these are all in amodule
namedapp
. Therefore it isn't DRY to break it into anotherenvironment
or differentmodule
, it reuses all the same params etc.omit-module
so that we don't have to delete or move these test modules out of the dir structureEnvironment:
ksonnet version: 0.13.0
jsonnet version: v0.11.2
client-go version: kubernetes-1.10.4
I don't know
go
but it may help to know that this was important enough that I wrappedks show
with a nodejs script with the above functionality.https://gist.github.com/rosskevin/12ed2dc43880e25b10763dc3f556a557
The text was updated successfully, but these errors were encountered: