forked from spinnaker/clouddriver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kubernetes): support label selectors in deploy manifest stages
via a new labelSelectors pipeline configuration property. The syntax is the same as what's currently implemented in delete manifest stages. For example: { "labelSelectors": { "selectors": [ { "kind": "EQUALS", "key": "my-label-key", "values": [ "my-value" ], } ] } } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ and KubernetesSelector for more. Multiple selectors combine with AND (i.e. must all be satisfied). Note that kubectl replace doesn't support label selectors, so KubernetesDeployManifestOperation throws an exception if a deploy manifest stage that specifies (non-empty) label selectors has a manifest with a strategy.spinnaker.io/replace: "true" annotation. Although it's possible to implement the label selector logic in clouddriver, this PR explicitly avoids that, and leaves the label selector logic to kubectl. It's possible that none of the manifests may satisfy the label selectors. In that case, a new pipeline configuration property named allowNothingSelected determines the behavior. If false (the default), KubernetesDeployManifestOperation throws an exception. If true, the operation succeeds even though nothing was deployed. closes spinnaker/spinnaker#3695.
- Loading branch information
Showing
12 changed files
with
552 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.