Last active
January 15, 2019 21:47
-
-
Save j-griffith/65499fbfb1c35bc8e05c2cce70ac330c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // GitPopulator provides a struct for populating PVCs with data form a Git repo | |
| type GitPopulator struct { | |
| Repo string `json:"repo"` | |
| Branch string `json:"branch,omitempty"` | |
| Tag string `json:"tag,omitempty"` | |
| } | |
| // HTTPPopulator provides a struct for populating PVCs with data from a simple HTTP source | |
| type HTTPPopulator struct { | |
| URL string `json:"url"` | |
| } | |
| // S3Populator provides a struct for populating PVCs with data from an S3 source | |
| type S3Populator struct { | |
| URL string `json:"url"` | |
| } | |
| // PopulatorSpec defines the desired state of Populator | |
| type PopulatorSpec struct { | |
| PVC string `json:"pvc"` | |
| PopulatorType string `json:"populator_type"` | |
| DestinationDirectory string `json:"destination_directory"` | |
| Git *GitPopulator `json:"git,omitempty"` | |
| HTTP *HTTPPopulator `json:"http,omitempty"` | |
| S3 *S3Populator `json:"s3,omitempty"` | |
| } | |
| ```````````````````````````````````` | |
| apiVersion: populators.k8s.io/v1alpha1 | |
| kind: Populator | |
| metadata: | |
| labels: | |
| controller-tools.k8s.io: "1.0" | |
| name: git-populator | |
| spec: | |
| PopulatorType: "git" | |
| DestinationDirectory: "/data" | |
| Git: | |
| Repo: "https://github.com/j-griffith/foo" | |
| Branch: "master" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment