-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from gdt-dev/action-parse
rework label selector and resource identifier type
- Loading branch information
Showing
18 changed files
with
598 additions
and
329 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Use and distribution licensed under the Apache license version 2. | ||
// | ||
// See the COPYING file in the root project directory for full text. | ||
|
||
package kube | ||
|
||
// Action describes the the Kubernetes-specific action that is performed by the | ||
// test. | ||
type Action struct { | ||
// Create is a string containing a file path or raw YAML content describing | ||
// a Kubernetes resource to call `kubectl create` with. | ||
Create string `yaml:"create,omitempty"` | ||
// Apply is a string containing a file path or raw YAML content describing | ||
// a Kubernetes resource to call `kubectl apply` with. | ||
Apply string `yaml:"apply,omitempty"` | ||
// Delete is a string or object containing arguments to `kubectl delete`. | ||
// | ||
// It must be one of the following: | ||
// | ||
// - a file path to a manifest that will be read and the resources | ||
// described in the manifest will be deleted | ||
// - a resource kind or kind alias, e.g. "pods", "po", followed by one of | ||
// the following: | ||
// * a space or `/` character followed by the resource name to delete | ||
// only a resource with that name. | ||
// - an object with a `type` and optional `labels` field containing a label | ||
// selector that should be used to select that `type` of resource. | ||
Delete *ResourceIdentifierOrFile `yaml:"delete,omitempty"` | ||
// Get is a string or object containing arguments to `kubectl get`. | ||
// | ||
// It must be one of the following: | ||
// | ||
// - a string with a resource kind or kind alias, e.g. "pods", "po", | ||
// followed by one of the following: | ||
// * a space or `/` character followed by the resource name to get only a | ||
// resource with that name. | ||
// - an object with a `type` and optional `labels` field containing a label | ||
// selector that should be used to select that `type` of resource. | ||
Get *ResourceIdentifier `yaml:"get,omitempty"` | ||
} |
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.