147b97048b
Add NewBundleByPath function, that would return bundle built from the specified path argument Add CurrentContextEntryPoint method of the config object, that would allow easily get kustomize root path based on clusterType and phase. You can also leave phase arg empty string, which would try to return bundle for all phases Introduce changes to config pakage objects: - Manifest: SubPath: this is relative path to the root of the repository that contains directories with sites (SiteNames) PrimaryRepositoryName: this is a string that must correspond to a key of the Repositories map of manifest object, which is used to derive primary repository Repositories object is a map, map keys correspond to names of the directories where `document pull` command will download repositories defined in manifest prepended by manifest.TargetPath. Introduce new config method CurrentContextEntryPoint(), method takes TargetPath, PrimaryRepo.URL, SubPath, and clusterType and phase constructs a path to the entry point out of which the DocumentBundle should be build, and returns it to the caller. After that caller can build a bundle out of it, the bundle will contain documents relevant to particular cluster-type and phase. All objects that depend on bundle interface are updated to use the CurrentContextEntryPoint() method of the config object Relates-To: #99 Closes: #99 Change-Id: I99320c4cb626841d46f4c298b583e9af90b1dce4
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
apiVersion: airshipit.org/v1alpha1
|
|
clusters:
|
|
dummy_cluster:
|
|
cluster-type:
|
|
ephemeral:
|
|
bootstrap-info: dummy_bootstrap_config
|
|
cluster-kubeconf: dummy_cluster_ephemeral
|
|
target:
|
|
bootstrap-info: dummy_bootstrap_config
|
|
cluster-kubeconf: dummy_cluster_target
|
|
contexts:
|
|
dummy_context:
|
|
context-kubeconf: dummy_cluster_ephemeral
|
|
manifest: dummy_manifest
|
|
current-context: dummy_context
|
|
kind: Config
|
|
manifests:
|
|
dummy_manifest:
|
|
primary-repository-name: primary
|
|
repositories:
|
|
primary:
|
|
auth:
|
|
ssh-key: testdata/test-key.pem
|
|
type: ssh-key
|
|
checkout:
|
|
branch: ""
|
|
force: false
|
|
remote-ref: ""
|
|
tag: v1.0.1
|
|
url: http://dummy.url.com/manifests.git
|
|
sub-path: manifests/site/test-site
|
|
target-path: /var/tmp/
|
|
modules-config:
|
|
bootstrapInfo:
|
|
dummy_bootstrap_config:
|
|
builder:
|
|
networkConfigFileName: netconfig
|
|
outputMetadataFileName: output-metadata.yaml
|
|
userDataFileName: user-data
|
|
container:
|
|
containerRuntime: docker
|
|
image: dummy_image:dummy_tag
|
|
volume: /dummy:dummy
|
|
users:
|
|
dummy_user: {}
|