forked from LaconicNetwork/kompose
Fix: Make the out flag print to one file using seperator (#1541)
* fix: make the out flag print to one file using seperator * fix: comment an unused function * fix: update test script * fix: update output k8s * fix: update the json output error condition * fix: update envvars interpolation tests * chore: update e2e tests to support yaml generation instead of JSON format * fix: update e2e tests according to ci environment * fix: apply PR changes
This commit is contained in:
parent
4c14b06333
commit
91391eb84f
@ -148,17 +148,6 @@ func getDirName(opt kobject.ConvertOptions) string {
|
||||
return dirName
|
||||
}
|
||||
|
||||
func objectToRaw(object runtime.Object) runtime.RawExtension {
|
||||
r := runtime.RawExtension{
|
||||
Object: object,
|
||||
}
|
||||
|
||||
bytes, _ := json.Marshal(object)
|
||||
r.Raw = bytes
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
// PrintList will take the data converted and decide on the commandline attributes given
|
||||
func PrintList(objects []runtime.Object, opt kobject.ConvertOptions) error {
|
||||
var f *os.File
|
||||
@ -192,36 +181,31 @@ func PrintList(objects []runtime.Object, opt kobject.ConvertOptions) error {
|
||||
}
|
||||
|
||||
var files []string
|
||||
|
||||
// if asked to print to stdout or to put in single file
|
||||
// we will create a list
|
||||
if opt.ToStdout || f != nil {
|
||||
list := &api.List{}
|
||||
// convert objects to versioned and add them to list
|
||||
if opt.GenerateJSON {
|
||||
return fmt.Errorf("cannot convert to one file while specifying a json output file or stdout option")
|
||||
}
|
||||
for _, object := range objects {
|
||||
versionedObject, err := convertToVersion(object)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
list.Items = append(list.Items, objectToRaw(versionedObject))
|
||||
}
|
||||
// version list itself
|
||||
list.Kind = "List"
|
||||
list.APIVersion = "v1"
|
||||
convertedList, err := convertToVersion(list)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
data, err := marshal(convertedList, opt.GenerateJSON, opt.YAMLIndent)
|
||||
data, err := marshal(versionedObject, opt.GenerateJSON, opt.YAMLIndent)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error in marshalling the List: %v", err)
|
||||
}
|
||||
// this part add --- which unifies the file
|
||||
data = []byte(fmt.Sprintf("---\n%s", data))
|
||||
printVal, err := transformer.Print("", dirName, "", data, opt.ToStdout, opt.GenerateJSON, f, opt.Provider)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "transformer.Print failed")
|
||||
return errors.Wrap(err, "transformer to print to one single file failed")
|
||||
}
|
||||
files = append(files, printVal)
|
||||
}
|
||||
} else {
|
||||
finalDirName := dirName
|
||||
if opt.CreateChart {
|
||||
|
||||
@ -100,13 +100,11 @@ function convert::match_output() {
|
||||
convert::run_cmd $cmd
|
||||
exit_status=$?
|
||||
if [ $exit_status -ne 0 ]; then FAIL_MSGS=$FAIL_MSGS"exit status: $exit_status\n"; return $exit_status; fi
|
||||
|
||||
match=$(jq --argfile a $TEMP_STDOUT --argfile b $expected_output -n 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); ($a | (post_recurse | arrays) |= sort) as $a | ($b | (post_recurse | arrays) |= sort) as $b | $a == $b')
|
||||
$cmd > /tmp/test.json
|
||||
diff /tmp/test.json $expected_output > /tmp/diff
|
||||
rm /tmp/test.json
|
||||
if [ "$match" = true ]; then SUCCESS_MSGS=$SUCCESS_MSGS"converted output matches\n"; return 0;
|
||||
else FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; cat /tmp/diff; rm /tmp/diff; return 1; fi
|
||||
match=$(diff <(yq -P 'sort_keys(....)' $expected_output) <(yq -P 'sort_keys(....)' $TEMP_STDOUT))
|
||||
echo "$match" > /tmp/diff
|
||||
if [ "$match" == "" ]; then SUCCESS_MSGS=$SUCCESS_MSGS"converted output matches\n"; return 0;
|
||||
else FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; cat /tmp/diff; rm /tmp/diff; return 1;
|
||||
fi
|
||||
}
|
||||
readonly -f convert::match_output
|
||||
|
||||
|
||||
@ -41,24 +41,24 @@ sed -e "s;%VERSION%;$version;g" -e "s;%URI%;$uri;g" -e "s;%REF%;$branch;g" $KOMP
|
||||
|
||||
|
||||
|
||||
## TEST V2
|
||||
# ## TEST V2
|
||||
DIR="v2"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-os.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-os.yaml"
|
||||
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$os_cmd" "$os_output"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success_and_warning "$os_cmd" "$os_output"
|
||||
|
||||
|
||||
|
||||
## TEST V3
|
||||
DIR="v3.0"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-os.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/$DIR/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/$DIR/output-os.yaml"
|
||||
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success_and_warning "$os_cmd" "$os_output"
|
||||
@ -96,7 +96,7 @@ convert::check_artifacts_generated "kompose --build local -f $KOMPOSE_ROOT/scrip
|
||||
relative_path=$(realpath --relative-to="$PWD" "$KOMPOSE_ROOT/script/test/fixtures/buildconfig/docker-compose-v3.yml")
|
||||
convert::check_artifacts_generated "kompose --build local -f $relative_path convert -o $TEMP_DIR/output_file" "$TEMP_DIR/output_file"
|
||||
|
||||
#####
|
||||
# #####
|
||||
# Test the build config with push image
|
||||
# see tests_push_image.sh for local push test
|
||||
# Should warn when push image disabled
|
||||
@ -104,110 +104,115 @@ cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/buildconfig/docker-compose-bu
|
||||
convert::expect_warning "$cmd" "Push image registry 'whatever' is specified but push image is disabled, skipping pushing to repository"
|
||||
|
||||
#TEST the kompose.volume.storage-class-name label
|
||||
convert::check_artifacts_generated "kompose -f $KOMPOSE_ROOT/script/test/fixtures/storage-class-name/docker-compose.yml convert -o $TEMP_DIR/output-k8s.json -j" "$TEMP_DIR/output-k8s.json"
|
||||
convert::check_artifacts_generated "kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/storage-class-name/docker-compose.yml convert -o $TEMP_DIR/output-os.json -j" "$TEMP_DIR/output-os.json"
|
||||
convert::check_artifacts_generated "kompose -f $KOMPOSE_ROOT/script/test/fixtures/storage-class-name/docker-compose.yml convert -o $TEMP_DIR/output-k8s.yaml" "$TEMP_DIR/output-k8s.yaml"
|
||||
convert::check_artifacts_generated "kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/storage-class-name/docker-compose.yml convert -o $TEMP_DIR/output-os.yaml -j" "$TEMP_DIR/output-os.yaml"
|
||||
|
||||
# TEST the windows volume
|
||||
# windows host path to windows container
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/output-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/output-os.json"
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$os_cmd" "$os_output"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/output-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/windows/output-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success_and_warning "$os_cmd" "$os_output"
|
||||
|
||||
# TEST the placement
|
||||
# # TEST the placement
|
||||
# should convert placement to affinity
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/deploy/placement/docker-compose-placement.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/deploy/placement/docker-compose-placement.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/deploy/placement/output-placement-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/deploy/placement/output-placement-os.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/deploy/placement/docker-compose-placement.yaml convert --stdout --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/deploy/placement/docker-compose-placement.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/deploy/placement/output-placement-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/deploy/placement/output-placement-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success_and_warning "$os_cmd" "$os_output"
|
||||
|
||||
|
||||
# test configmap volume
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose.yml convert --stdout -j --with-kompose-annotation=false --volumes=configMap"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose.yml convert --stdout -j --with-kompose-annotation=false --volumes=configMap"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-os.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose.yml convert --stdout --with-kompose-annotation=false --volumes=configMap"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose.yml convert --stdout --with-kompose-annotation=false --volumes=configMap"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$os_cmd" "$os_output"
|
||||
|
||||
# test configmap volume using service label
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose-withlabel.yml convert --stdout -j --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose-withlabel.yml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-k8s-withlabel.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-os-withlabel.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose-withlabel.yml convert --stdout --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/configmap-volume/docker-compose-withlabel.yml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/configmap-volume/output-os-withlabel.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$os_cmd" "$os_output"
|
||||
|
||||
# Test that emptyDir works
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout -j --volumes emptyDir"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.json"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout -j --volumes emptyDir"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-os-empty-vols-template.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --volumes emptyDir"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --volumes emptyDir"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success_and_warning "$os_cmd" "$os_output"
|
||||
|
||||
# Test that emptyvols works
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout -j --emptyvols"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.json"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout -j --emptyvols"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-os-empty-vols-template.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --emptyvols"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-k8s.yaml"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/change-in-volume/docker-compose.yml convert --with-kompose-annotation=false --stdout --emptyvols"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/change-in-volume/output-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success_and_warning "$os_cmd" "$os_output"
|
||||
|
||||
# test service expose
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/expose/compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
ocp_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/expose/compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/expose/output-k8s.json"
|
||||
ocp_output="$KOMPOSE_ROOT/script/test/fixtures/expose/output-ocp.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/expose/compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
ocp_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/expose/compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/expose/output-k8s.yaml"
|
||||
ocp_output="$KOMPOSE_ROOT/script/test/fixtures/expose/output-os.yaml"
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$ocp_cmd" "$ocp_output"
|
||||
|
||||
|
||||
# test service group by volume, not support openshift for now
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/service-group/compose.yaml convert --stdout -j --with-kompose-annotation=false --service-group-mode=volume"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/service-group/output-k8s.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/service-group/compose.yaml convert --stdout --with-kompose-annotation=false --service-group-mode=volume"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/service-group/output-k8s.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
|
||||
# test merge multiple compose files
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/first.yaml -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/second.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
ocp_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/first.yaml -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/second.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-files/output-k8s.json"
|
||||
ocp_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-files/output-ocp.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/first.yaml -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/second.yaml convert --stdout --with-kompose-annotation=false"
|
||||
ocp_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/first.yaml -f $KOMPOSE_ROOT/script/test/fixtures/multiple-files/second.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-files/output-k8s.yaml"
|
||||
ocp_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-files/output-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$ocp_cmd" "$ocp_output"
|
||||
|
||||
# test health check
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout -j --service-group-mode=label --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout -j --service-group-mode=label --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/healthcheck/output-healthcheck-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/healthcheck/output-healthcheck-os.json"
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout --service-group-mode=label --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/healthcheck/docker-compose-healthcheck.yaml convert --stdout --service-group-mode=label --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/healthcheck/output-healthcheck-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$os_cmd" "$os_output"
|
||||
|
||||
# test statefulset
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/statefulset/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false --controller statefulset"
|
||||
ocp_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/statefulset/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false --controller statefulset"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/statefulset/output-k8s.json"
|
||||
ocp_output="$KOMPOSE_ROOT/script/test/fixtures/statefulset/output-os.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/statefulset/docker-compose.yaml convert --stdout --with-kompose-annotation=false --controller statefulset"
|
||||
ocp_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/statefulset/docker-compose.yaml convert --stdout --with-kompose-annotation=false --controller statefulset"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/statefulset/output-k8s.yaml"
|
||||
ocp_output="$KOMPOSE_ROOT/script/test/fixtures/statefulset/output-os.yaml"
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$ocp_cmd" "$ocp_output"
|
||||
|
||||
# test specifying volume type using service label
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/output-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/output-os.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/output-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/multiple-type-volumes/output-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$os_cmd" "$os_output"
|
||||
|
||||
# Test environment variables interpolation
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/docker-compose.yaml convert --stdout -j --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/output-k8s.json"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/output-os.json"
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
os_cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/output-k8s.yaml"
|
||||
os_output="$KOMPOSE_ROOT/script/test/fixtures/envvars-interpolation/output-os.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
convert::expect_success "$os_cmd" "$os_output"
|
||||
|
||||
# Test single file output feature
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/single-file-output/docker-compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/single-file-output/output-k8s.yaml"
|
||||
convert::expect_success_and_warning "$k8s_cmd" "$k8s_output"
|
||||
|
||||
@ -1,170 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "code-volume",
|
||||
"emptyDir": {}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": "flask_web",
|
||||
"args": [
|
||||
"python",
|
||||
"app.py"
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "code-volume",
|
||||
"mountPath": "/code"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
108
script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml
vendored
Normal file
108
script/test/fixtures/change-in-volume/output-k8s-empty-vols-template.yaml
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: headless
|
||||
port: 55555
|
||||
targetPort: 0
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
ports:
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis
|
||||
name: redis
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- python
|
||||
- app.py
|
||||
image: flask_web
|
||||
name: web
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /code
|
||||
name: code-volume
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: code-volume
|
||||
status: {}
|
||||
@ -1,217 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.service.type": "headless",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.service.type": "headless",
|
||||
"kompose.version": "%VERSION%"
|
||||
},
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"name": "redis"
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"strategy": {},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.service.type": "headless",
|
||||
"kompose.version": "%VERSION%"
|
||||
},
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"image": "redis",
|
||||
"imagePullPolicy": "",
|
||||
"name": "redis",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
"serviceAccountName": "",
|
||||
"volumes": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
},
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"name": "web"
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
},
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"args": [
|
||||
"python",
|
||||
"app.py"
|
||||
],
|
||||
"image": "flask_web",
|
||||
"imagePullPolicy": "",
|
||||
"name": "web",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"mountPath": "/code",
|
||||
"name": "web-claim0"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
"serviceAccountName": "",
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "web-claim0"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
109
script/test/fixtures/change-in-volume/output-k8s.yaml
vendored
Normal file
109
script/test/fixtures/change-in-volume/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: headless
|
||||
port: 55555
|
||||
targetPort: 0
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
ports:
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis
|
||||
name: redis
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- python
|
||||
- app.py
|
||||
image: flask_web
|
||||
name: web
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /code
|
||||
name: code-volume
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: code-volume
|
||||
status: {}
|
||||
|
||||
@ -1,286 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"web"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "web:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "code-volume",
|
||||
"emptyDir": {}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": " ",
|
||||
"args": [
|
||||
"python",
|
||||
"app.py"
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "code-volume",
|
||||
"mountPath": "/code"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "flask_web"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
189
script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml
vendored
Normal file
189
script/test/fixtures/change-in-volume/output-os-empty-vols-template.yaml
vendored
Normal file
@ -0,0 +1,189 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: headless
|
||||
port: 55555
|
||||
targetPort: 0
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
ports:
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: redis
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- redis
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: redis
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- python
|
||||
- app.py
|
||||
image: ' '
|
||||
name: web
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /code
|
||||
name: code-volume
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: code-volume
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- web
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: web:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: flask_web
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
@ -1,296 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.service.type": "headless",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.service.type": "headless",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"web"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "web:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "web-claim0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": " ",
|
||||
"args": [
|
||||
"python",
|
||||
"app.py"
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "web-claim0",
|
||||
"mountPath": "/code"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "flask_web"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
189
script/test/fixtures/change-in-volume/output-os.yaml
vendored
Normal file
189
script/test/fixtures/change-in-volume/output-os.yaml
vendored
Normal file
@ -0,0 +1,189 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: headless
|
||||
port: 55555
|
||||
targetPort: 0
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
ports:
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: redis
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- redis
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: redis
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- python
|
||||
- app.py
|
||||
image: ' '
|
||||
name: web
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /code
|
||||
name: code-volume
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: code-volume
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- web
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: web:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: flask_web
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
@ -1,202 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"configMap": {
|
||||
"name": "db-cm0",
|
||||
"items": [
|
||||
{
|
||||
"key": "configs.tar",
|
||||
"path": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": "mysql",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"mountPath": "/data/configs.tar",
|
||||
"subPath": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"binaryData": {
|
||||
"configs.tar": "SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ=="
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"configMap": {
|
||||
"name": "web-cm0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"configMap": {
|
||||
"name": "web-cm1",
|
||||
"items": [
|
||||
{
|
||||
"key": "a.key",
|
||||
"path": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": "nginx",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"mountPath": "/etc/tls"
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"mountPath": "/etc/test-a-key.key",
|
||||
"subPath": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.crt": "test-crt-data...",
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
129
script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml
vendored
Normal file
129
script/test/fixtures/configmap-volume/output-k8s-withlabel.yaml
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: mysql
|
||||
name: db
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /data/configs.tar
|
||||
name: db-cm0
|
||||
subPath: configs.tar
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
items:
|
||||
- key: configs.tar
|
||||
path: configs.tar
|
||||
name: db-cm0
|
||||
name: db-cm0
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
binaryData:
|
||||
configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ==
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db-cm0
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: web
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/tls
|
||||
name: web-cm0
|
||||
- mountPath: /etc/test-a-key.key
|
||||
name: web-cm1
|
||||
subPath: test-a-key.key
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
name: web-cm0
|
||||
name: web-cm0
|
||||
- configMap:
|
||||
items:
|
||||
- key: a.key
|
||||
path: test-a-key.key
|
||||
name: web-cm1
|
||||
name: web-cm1
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.crt: test-crt-data...
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm1
|
||||
|
||||
@ -1,190 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"configMap": {
|
||||
"name": "db-cm0",
|
||||
"items": [
|
||||
{
|
||||
"key": "configs.tar",
|
||||
"path": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": "mysql",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"mountPath": "/data/configs.tar",
|
||||
"subPath": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"binaryData": {
|
||||
"configs.tar": "SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ=="
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"configMap": {
|
||||
"name": "web-cm0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"configMap": {
|
||||
"name": "web-cm1",
|
||||
"items": [
|
||||
{
|
||||
"key": "a.key",
|
||||
"path": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": "nginx",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"mountPath": "/etc/tls"
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"mountPath": "/etc/test-a-key.key",
|
||||
"subPath": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.crt": "test-crt-data...",
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
121
script/test/fixtures/configmap-volume/output-k8s.yaml
vendored
Normal file
121
script/test/fixtures/configmap-volume/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: mysql
|
||||
name: db
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /data/configs.tar
|
||||
name: db-cm0
|
||||
subPath: configs.tar
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
items:
|
||||
- key: configs.tar
|
||||
path: configs.tar
|
||||
name: db-cm0
|
||||
name: db-cm0
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
binaryData:
|
||||
configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ==
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db-cm0
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: web
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/tls
|
||||
name: web-cm0
|
||||
- mountPath: /etc/test-a-key.key
|
||||
name: web-cm1
|
||||
subPath: test-a-key.key
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
name: web-cm0
|
||||
name: web-cm0
|
||||
- configMap:
|
||||
items:
|
||||
- key: a.key
|
||||
path: test-a-key.key
|
||||
name: web-cm1
|
||||
name: web-cm1
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.crt: test-crt-data...
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm1
|
||||
|
||||
@ -1,314 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"db"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "db:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"configMap": {
|
||||
"name": "db-cm0",
|
||||
"items": [
|
||||
{
|
||||
"key": "configs.tar",
|
||||
"path": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": " ",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"mountPath": "/data/configs.tar",
|
||||
"subPath": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "mysql"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"binaryData": {
|
||||
"configs.tar": "SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ=="
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"web"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "web:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"configMap": {
|
||||
"name": "web-cm0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"configMap": {
|
||||
"name": "web-cm1",
|
||||
"items": [
|
||||
{
|
||||
"key": "a.key",
|
||||
"path": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": " ",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"mountPath": "/etc/tls"
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"mountPath": "/etc/test-a-key.key",
|
||||
"subPath": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "nginx"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.crt": "test-crt-data...",
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
207
script/test/fixtures/configmap-volume/output-os-withlabel.yaml
vendored
Normal file
207
script/test/fixtures/configmap-volume/output-os-withlabel.yaml
vendored
Normal file
@ -0,0 +1,207 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: db
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /data/configs.tar
|
||||
name: db-cm0
|
||||
subPath: configs.tar
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
items:
|
||||
- key: configs.tar
|
||||
path: configs.tar
|
||||
name: db-cm0
|
||||
name: db-cm0
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- db
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: db:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: mysql
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
binaryData:
|
||||
configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ==
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: web
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/tls
|
||||
name: web-cm0
|
||||
- mountPath: /etc/test-a-key.key
|
||||
name: web-cm1
|
||||
subPath: test-a-key.key
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
name: web-cm0
|
||||
name: web-cm0
|
||||
- configMap:
|
||||
items:
|
||||
- key: a.key
|
||||
path: test-a-key.key
|
||||
name: web-cm1
|
||||
name: web-cm1
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- web
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: web:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: nginx
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.crt: test-crt-data...
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm1
|
||||
|
||||
308
script/test/fixtures/configmap-volume/output-os.json
vendored
308
script/test/fixtures/configmap-volume/output-os.json
vendored
@ -1,308 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"db"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "db:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"configMap": {
|
||||
"name": "db-cm0",
|
||||
"items": [
|
||||
{
|
||||
"key": "configs.tar",
|
||||
"path": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": " ",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-cm0",
|
||||
"mountPath": "/data/configs.tar",
|
||||
"subPath": "configs.tar"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "mysql"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"binaryData": {
|
||||
"configs.tar": "SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ=="
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"web"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "web:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"configMap": {
|
||||
"name": "web-cm0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"configMap": {
|
||||
"name": "web-cm1",
|
||||
"items": [
|
||||
{
|
||||
"key": "a.key",
|
||||
"path": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": " ",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"mountPath": "/etc/tls"
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"mountPath": "/etc/test-a-key.key",
|
||||
"subPath": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "nginx"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.crt": "test-crt-data...",
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
203
script/test/fixtures/configmap-volume/output-os.yaml
vendored
Normal file
203
script/test/fixtures/configmap-volume/output-os.yaml
vendored
Normal file
@ -0,0 +1,203 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: db
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /data/configs.tar
|
||||
name: db-cm0
|
||||
subPath: configs.tar
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
items:
|
||||
- key: configs.tar
|
||||
path: configs.tar
|
||||
name: db-cm0
|
||||
name: db-cm0
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- db
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: db:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: mysql
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
binaryData:
|
||||
configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ==
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: web
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/tls
|
||||
name: web-cm0
|
||||
- mountPath: /etc/test-a-key.key
|
||||
name: web-cm1
|
||||
subPath: test-a-key.key
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
name: web-cm0
|
||||
name: web-cm0
|
||||
- configMap:
|
||||
items:
|
||||
- key: a.key
|
||||
path: test-a-key.key
|
||||
name: web-cm1
|
||||
name: web-cm1
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- web
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: web:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: nginx
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.crt: test-crt-data...
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm1
|
||||
|
||||
@ -1,132 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
"affinity": {
|
||||
"nodeAffinity": {
|
||||
"requiredDuringSchedulingIgnoredDuringExecution": {
|
||||
"nodeSelectorTerms": [
|
||||
{
|
||||
"matchExpressions": [
|
||||
{
|
||||
"key": "kubernetes.io/hostname",
|
||||
"operator": "In",
|
||||
"values": [
|
||||
"machine"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "kubernetes.io/os",
|
||||
"operator": "In",
|
||||
"values": [
|
||||
"ubuntu 14.04"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "foo",
|
||||
"operator": "NotIn",
|
||||
"values": [
|
||||
"bar"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"topologySpreadConstraints": [
|
||||
{
|
||||
"maxSkew": 2,
|
||||
"topologyKey": "zone",
|
||||
"whenUnsatisfiable": "ScheduleAnyway",
|
||||
"labelSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"maxSkew": 1,
|
||||
"topologyKey": "ssd",
|
||||
"whenUnsatisfiable": "ScheduleAnyway",
|
||||
"labelSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
77
script/test/fixtures/deploy/placement/output-placement-k8s.yaml
vendored
Normal file
77
script/test/fixtures/deploy/placement/output-placement-k8s.yaml
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- machine
|
||||
- key: kubernetes.io/os
|
||||
operator: In
|
||||
values:
|
||||
- ubuntu 14.04
|
||||
- key: foo
|
||||
operator: NotIn
|
||||
values:
|
||||
- bar
|
||||
containers:
|
||||
- image: redis
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
topologySpreadConstraints:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
maxSkew: 2
|
||||
topologyKey: zone
|
||||
whenUnsatisfiable: ScheduleAnyway
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
maxSkew: 1
|
||||
topologyKey: ssd
|
||||
whenUnsatisfiable: ScheduleAnyway
|
||||
status: {}
|
||||
|
||||
@ -1,192 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
"affinity": {
|
||||
"nodeAffinity": {
|
||||
"requiredDuringSchedulingIgnoredDuringExecution": {
|
||||
"nodeSelectorTerms": [
|
||||
{
|
||||
"matchExpressions": [
|
||||
{
|
||||
"key": "kubernetes.io/hostname",
|
||||
"operator": "In",
|
||||
"values": [
|
||||
"machine"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "kubernetes.io/os",
|
||||
"operator": "In",
|
||||
"values": [
|
||||
"ubuntu 14.04"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "foo",
|
||||
"operator": "NotIn",
|
||||
"values": [
|
||||
"bar"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"topologySpreadConstraints": [
|
||||
{
|
||||
"maxSkew": 2,
|
||||
"topologyKey": "zone",
|
||||
"whenUnsatisfiable": "ScheduleAnyway",
|
||||
"labelSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"maxSkew": 1,
|
||||
"topologyKey": "ssd",
|
||||
"whenUnsatisfiable": "ScheduleAnyway",
|
||||
"labelSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
118
script/test/fixtures/deploy/placement/output-placement-os.yaml
vendored
Normal file
118
script/test/fixtures/deploy/placement/output-placement-os.yaml
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- machine
|
||||
- key: kubernetes.io/os
|
||||
operator: In
|
||||
values:
|
||||
- ubuntu 14.04
|
||||
- key: foo
|
||||
operator: NotIn
|
||||
values:
|
||||
- bar
|
||||
containers:
|
||||
- image: ' '
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
topologySpreadConstraints:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
maxSkew: 2
|
||||
topologyKey: zone
|
||||
whenUnsatisfiable: ScheduleAnyway
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
maxSkew: 1
|
||||
topologyKey: ssd
|
||||
whenUnsatisfiable: ScheduleAnyway
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- redis
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: redis
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
@ -1,60 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "myservice",
|
||||
"image": "alpine",
|
||||
"args": [
|
||||
"curl",
|
||||
"$(PROTOCOL)://$(DOMAIN)/"
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DOMAIN",
|
||||
"value": "google.com"
|
||||
},
|
||||
{
|
||||
"name": "PROTOCOL",
|
||||
"value": "https"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
35
script/test/fixtures/envvars-interpolation/output-k8s.yaml
vendored
Normal file
35
script/test/fixtures/envvars-interpolation/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: myservice
|
||||
name: myservice
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: myservice
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: myservice
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- curl
|
||||
- $(PROTOCOL)://$(DOMAIN)/
|
||||
env:
|
||||
- name: DOMAIN
|
||||
value: google.com
|
||||
- name: PROTOCOL
|
||||
value: https
|
||||
image: alpine
|
||||
name: myservice
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
@ -1,120 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"myservice"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "myservice:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "myservice"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "myservice",
|
||||
"image": " ",
|
||||
"args": [
|
||||
"curl",
|
||||
"$(PROTOCOL)://$(DOMAIN)/"
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DOMAIN",
|
||||
"value": "google.com"
|
||||
},
|
||||
{
|
||||
"name": "PROTOCOL",
|
||||
"value": "https"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "alpine"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
script/test/fixtures/envvars-interpolation/output-os.yaml
vendored
Normal file
76
script/test/fixtures/envvars-interpolation/output-os.yaml
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: myservice
|
||||
name: myservice
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: myservice
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: myservice
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- curl
|
||||
- $(PROTOCOL)://$(DOMAIN)/
|
||||
env:
|
||||
- name: DOMAIN
|
||||
value: google.com
|
||||
- name: PROTOCOL
|
||||
value: https
|
||||
image: ' '
|
||||
name: myservice
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- myservice
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: myservice:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: myservice
|
||||
name: myservice
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: alpine
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
233
script/test/fixtures/expose/output-k8s.json
vendored
233
script/test/fixtures/expose/output-k8s.json
vendored
@ -1,233 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.expose": "batman.example.com/dev,batwoman.example.com",
|
||||
"kompose.service.expose.ingress-class-name": "nginx",
|
||||
"kompose.service.expose.tls-secret": "test-secret"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis:3.0",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.expose": "batman.example.com/dev,batwoman.example.com",
|
||||
"kompose.service.expose.ingress-class-name": "nginx",
|
||||
"kompose.service.expose.tls-secret": "test-secret"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.expose": "batman.example.com/dev,batwoman.example.com",
|
||||
"kompose.service.expose.ingress-class-name": "nginx",
|
||||
"kompose.service.expose.tls-secret": "test-secret"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": "tuna/docker-counter23",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Ingress",
|
||||
"apiVersion": "networking.k8s.io/v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.expose": "batman.example.com/dev,batwoman.example.com",
|
||||
"kompose.service.expose.ingress-class-name": "nginx",
|
||||
"kompose.service.expose.tls-secret": "test-secret"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ingressClassName": "nginx",
|
||||
"tls": [
|
||||
{
|
||||
"hosts": [
|
||||
"batman.example.com",
|
||||
"batwoman.example.com"
|
||||
],
|
||||
"secretName": "test-secret"
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"host": "batman.example.com",
|
||||
"http": {
|
||||
"paths": [
|
||||
{
|
||||
"path": "/dev",
|
||||
"pathType": "Prefix",
|
||||
"backend": {
|
||||
"service": {
|
||||
"name": "web",
|
||||
"port": {
|
||||
"number": 5000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"host": "batwoman.example.com",
|
||||
"http": {
|
||||
"paths": [
|
||||
{
|
||||
"path": "/",
|
||||
"pathType": "Prefix",
|
||||
"backend": {
|
||||
"service": {
|
||||
"name": "web",
|
||||
"port": {
|
||||
"number": 5000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
148
script/test/fixtures/expose/output-k8s.yaml
vendored
Normal file
148
script/test/fixtures/expose/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,148 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: batman.example.com/dev,batwoman.example.com
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
kompose.service.expose.tls-secret: test-secret
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
ports:
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis:3.0
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: batman.example.com/dev,batwoman.example.com
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
kompose.service.expose.tls-secret: test-secret
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: web
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: batman.example.com/dev,batwoman.example.com
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
kompose.service.expose.tls-secret: test-secret
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: tuna/docker-counter23
|
||||
name: web
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: batman.example.com/dev,batwoman.example.com
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
kompose.service.expose.tls-secret: test-secret
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: batman.example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: web
|
||||
port:
|
||||
number: 5000
|
||||
path: /dev
|
||||
pathType: Prefix
|
||||
- host: batwoman.example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: web
|
||||
port:
|
||||
number: 5000
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- batman.example.com
|
||||
- batwoman.example.com
|
||||
secretName: test-secret
|
||||
status:
|
||||
loadBalancer: {}
|
||||
300
script/test/fixtures/expose/output-ocp.json
vendored
300
script/test/fixtures/expose/output-ocp.json
vendored
@ -1,300 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.expose": "batman.example.com/dev,batwoman.example.com",
|
||||
"kompose.service.expose.ingress-class-name": "nginx",
|
||||
"kompose.service.expose.tls-secret": "test-secret"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "3.0",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis:3.0"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.expose": "batman.example.com/dev,batwoman.example.com",
|
||||
"kompose.service.expose.ingress-class-name": "nginx",
|
||||
"kompose.service.expose.tls-secret": "test-secret"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"web"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "web:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "tuna/docker-counter23"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Route",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"host": "batman.example.com/dev,batwoman.example.com",
|
||||
"to": {
|
||||
"kind": "Service",
|
||||
"name": "web",
|
||||
"weight": null
|
||||
},
|
||||
"port": {
|
||||
"targetPort": 5000
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
202
script/test/fixtures/expose/output-os.yaml
vendored
Normal file
202
script/test/fixtures/expose/output-os.yaml
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: batman.example.com/dev,batwoman.example.com
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
kompose.service.expose.tls-secret: test-secret
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
ports:
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- redis
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:3.0
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: redis:3.0
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: "3.0"
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: batman.example.com/dev,batwoman.example.com
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
kompose.service.expose.tls-secret: test-secret
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: web
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- web
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: web:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: tuna/docker-counter23
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Route
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
host: batman.example.com/dev,batwoman.example.com
|
||||
port:
|
||||
targetPort: 5000
|
||||
to:
|
||||
kind: Service
|
||||
name: web
|
||||
weight: null
|
||||
status: {}
|
||||
|
||||
@ -1,401 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mongo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "my-group"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9090",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "27017",
|
||||
"port": 27017,
|
||||
"targetPort": 27017
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "my-group"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mysql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "my-group"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8081",
|
||||
"kompose.service.healthcheck.readiness.interval": "11s",
|
||||
"kompose.service.healthcheck.readiness.retries": "6",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9091",
|
||||
"kompose.service.healthcheck.readiness.timeout": "2s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "3306",
|
||||
"port": 3306,
|
||||
"targetPort": 3306
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "my-group"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "postgresql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.liveness.http_get_path": "/health",
|
||||
"kompose.service.healthcheck.liveness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.http_get_path": "/ready",
|
||||
"kompose.service.healthcheck.readiness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5432",
|
||||
"port": 5432,
|
||||
"targetPort": 5432
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "postgresql"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.test": "echo \"liveness\"",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "my-group",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "my-group"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8081",
|
||||
"kompose.service.healthcheck.readiness.interval": "11s",
|
||||
"kompose.service.healthcheck.readiness.retries": "6",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9091",
|
||||
"kompose.service.healthcheck.readiness.timeout": "2s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "my-group"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "my-group"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9090",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "mongo",
|
||||
"image": "mongo",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 27017
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 8080
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
},
|
||||
"readinessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 9090
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mysql",
|
||||
"image": "mysql",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3306
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 8081
|
||||
},
|
||||
"timeoutSeconds": 2,
|
||||
"periodSeconds": 11,
|
||||
"failureThreshold": 6
|
||||
},
|
||||
"readinessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 9091
|
||||
},
|
||||
"timeoutSeconds": 2,
|
||||
"periodSeconds": 11,
|
||||
"failureThreshold": 6
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "postgresql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.liveness.http_get_path": "/health",
|
||||
"kompose.service.healthcheck.liveness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.http_get_path": "/ready",
|
||||
"kompose.service.healthcheck.readiness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.liveness.http_get_path": "/health",
|
||||
"kompose.service.healthcheck.liveness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.http_get_path": "/ready",
|
||||
"kompose.service.healthcheck.readiness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "postgresql",
|
||||
"image": "postgresql",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5432
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"httpGet": {
|
||||
"path": "/health",
|
||||
"port": 8080
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
},
|
||||
"readinessProbe": {
|
||||
"httpGet": {
|
||||
"path": "/ready",
|
||||
"port": 8080
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.test": "echo \"liveness\"",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.test": "echo \"liveness\"",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"exec": {
|
||||
"command": [
|
||||
"echo \"liveness\""
|
||||
]
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
},
|
||||
"readinessProbe": {
|
||||
"exec": {
|
||||
"command": [
|
||||
"echo",
|
||||
"liveness"
|
||||
]
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
284
script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml
vendored
Normal file
284
script/test/fixtures/healthcheck/output-healthcheck-k8s.yaml
vendored
Normal file
@ -0,0 +1,284 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9090"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: my-group
|
||||
name: mongo
|
||||
spec:
|
||||
ports:
|
||||
- name: "27017"
|
||||
port: 27017
|
||||
targetPort: 27017
|
||||
selector:
|
||||
io.kompose.service: my-group
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8081"
|
||||
kompose.service.healthcheck.readiness.interval: 11s
|
||||
kompose.service.healthcheck.readiness.retries: "6"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9091"
|
||||
kompose.service.healthcheck.readiness.timeout: 2s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: my-group
|
||||
name: mysql
|
||||
spec:
|
||||
ports:
|
||||
- name: "3306"
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
selector:
|
||||
io.kompose.service: my-group
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.liveness.http_get_path: /health
|
||||
kompose.service.healthcheck.liveness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.http_get_path: /ready
|
||||
kompose.service.healthcheck.readiness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: postgresql
|
||||
name: postgresql
|
||||
spec:
|
||||
ports:
|
||||
- name: "5432"
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
selector:
|
||||
io.kompose.service: postgresql
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.test: echo "liveness"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8081"
|
||||
kompose.service.healthcheck.readiness.interval: 11s
|
||||
kompose.service.healthcheck.readiness.retries: "6"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9091"
|
||||
kompose.service.healthcheck.readiness.timeout: 2s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: my-group
|
||||
name: my-group
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: my-group
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9090"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: my-group
|
||||
spec:
|
||||
containers:
|
||||
- image: mongo
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
timeoutSeconds: 1
|
||||
name: mongo
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
readinessProbe:
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: 9090
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
- image: mysql
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
periodSeconds: 11
|
||||
tcpSocket:
|
||||
port: 8081
|
||||
timeoutSeconds: 2
|
||||
name: mysql
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
readinessProbe:
|
||||
failureThreshold: 6
|
||||
periodSeconds: 11
|
||||
tcpSocket:
|
||||
port: 9091
|
||||
timeoutSeconds: 2
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.liveness.http_get_path: /health
|
||||
kompose.service.healthcheck.liveness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.http_get_path: /ready
|
||||
kompose.service.healthcheck.readiness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: postgresql
|
||||
name: postgresql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: postgresql
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.liveness.http_get_path: /health
|
||||
kompose.service.healthcheck.liveness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.http_get_path: /ready
|
||||
kompose.service.healthcheck.readiness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: postgresql
|
||||
spec:
|
||||
containers:
|
||||
- image: postgresql
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
name: postgresql
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
readinessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 8080
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.test: echo "liveness"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.test: echo "liveness"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- echo "liveness"
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- echo
|
||||
- liveness
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
@ -1,660 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mongo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mongo"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9090",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "27017",
|
||||
"port": 27017,
|
||||
"targetPort": 27017
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "mongo"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mysql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mysql"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8081",
|
||||
"kompose.service.healthcheck.readiness.interval": "11s",
|
||||
"kompose.service.healthcheck.readiness.retries": "6",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9091",
|
||||
"kompose.service.healthcheck.readiness.timeout": "2s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "3306",
|
||||
"port": 3306,
|
||||
"targetPort": 3306
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "mysql"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "postgresql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.liveness.http_get_path": "/health",
|
||||
"kompose.service.healthcheck.liveness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.http_get_path": "/ready",
|
||||
"kompose.service.healthcheck.readiness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5432",
|
||||
"port": 5432,
|
||||
"targetPort": 5432
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "postgresql"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.test": "echo \"liveness\"",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mongo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mongo"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9090",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"mongo"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "mongo:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "mongo"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mongo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "mongo",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 27017
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 8080
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
},
|
||||
"readinessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 9090
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mongo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mongo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "mongo"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mysql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mysql"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.group": "my-group",
|
||||
"kompose.service.healthcheck.liveness.tcp_port": "8081",
|
||||
"kompose.service.healthcheck.readiness.interval": "11s",
|
||||
"kompose.service.healthcheck.readiness.retries": "6",
|
||||
"kompose.service.healthcheck.readiness.tcp_port": "9091",
|
||||
"kompose.service.healthcheck.readiness.timeout": "2s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"mysql"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "mysql:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "mysql"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mysql"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "mysql",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3306
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 8081
|
||||
},
|
||||
"timeoutSeconds": 2,
|
||||
"periodSeconds": 11,
|
||||
"failureThreshold": 6
|
||||
},
|
||||
"readinessProbe": {
|
||||
"tcpSocket": {
|
||||
"port": 9091
|
||||
},
|
||||
"timeoutSeconds": 2,
|
||||
"periodSeconds": 11,
|
||||
"failureThreshold": 6
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mysql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "mysql"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "mysql"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "postgresql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.liveness.http_get_path": "/health",
|
||||
"kompose.service.healthcheck.liveness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.http_get_path": "/ready",
|
||||
"kompose.service.healthcheck.readiness.http_get_port": "8080",
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"postgresql"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "postgresql:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "postgresql"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "postgresql",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5432
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"httpGet": {
|
||||
"path": "/health",
|
||||
"port": 8080
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
},
|
||||
"readinessProbe": {
|
||||
"httpGet": {
|
||||
"path": "/ready",
|
||||
"port": 8080
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "postgresql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "postgresql"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "postgresql"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.healthcheck.readiness.interval": "10s",
|
||||
"kompose.service.healthcheck.readiness.retries": "5",
|
||||
"kompose.service.healthcheck.readiness.test": "echo \"liveness\"",
|
||||
"kompose.service.healthcheck.readiness.timeout": "1s"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"exec": {
|
||||
"command": [
|
||||
"echo \"liveness\""
|
||||
]
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
},
|
||||
"readinessProbe": {
|
||||
"exec": {
|
||||
"command": [
|
||||
"echo",
|
||||
"liveness"
|
||||
]
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
459
script/test/fixtures/healthcheck/output-healthcheck-os.yaml
vendored
Normal file
459
script/test/fixtures/healthcheck/output-healthcheck-os.yaml
vendored
Normal file
@ -0,0 +1,459 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9090"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mongo
|
||||
name: mongo
|
||||
spec:
|
||||
ports:
|
||||
- name: "27017"
|
||||
port: 27017
|
||||
targetPort: 27017
|
||||
selector:
|
||||
io.kompose.service: mongo
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8081"
|
||||
kompose.service.healthcheck.readiness.interval: 11s
|
||||
kompose.service.healthcheck.readiness.retries: "6"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9091"
|
||||
kompose.service.healthcheck.readiness.timeout: 2s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mysql
|
||||
name: mysql
|
||||
spec:
|
||||
ports:
|
||||
- name: "3306"
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
selector:
|
||||
io.kompose.service: mysql
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.liveness.http_get_path: /health
|
||||
kompose.service.healthcheck.liveness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.http_get_path: /ready
|
||||
kompose.service.healthcheck.readiness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: postgresql
|
||||
name: postgresql
|
||||
spec:
|
||||
ports:
|
||||
- name: "5432"
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
selector:
|
||||
io.kompose.service: postgresql
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.test: echo "liveness"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9090"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mongo
|
||||
name: mongo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: mongo
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mongo
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
timeoutSeconds: 1
|
||||
name: mongo
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
readinessProbe:
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: 9090
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- mongo
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: mongo:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mongo
|
||||
name: mongo
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: mongo
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.group: my-group
|
||||
kompose.service.healthcheck.liveness.tcp_port: "8081"
|
||||
kompose.service.healthcheck.readiness.interval: 11s
|
||||
kompose.service.healthcheck.readiness.retries: "6"
|
||||
kompose.service.healthcheck.readiness.tcp_port: "9091"
|
||||
kompose.service.healthcheck.readiness.timeout: 2s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mysql
|
||||
name: mysql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: mysql
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mysql
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
periodSeconds: 11
|
||||
tcpSocket:
|
||||
port: 8081
|
||||
timeoutSeconds: 2
|
||||
name: mysql
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
readinessProbe:
|
||||
failureThreshold: 6
|
||||
periodSeconds: 11
|
||||
tcpSocket:
|
||||
port: 9091
|
||||
timeoutSeconds: 2
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- mysql
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: mysql:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: mysql
|
||||
name: mysql
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: mysql
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.liveness.http_get_path: /health
|
||||
kompose.service.healthcheck.liveness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.http_get_path: /ready
|
||||
kompose.service.healthcheck.readiness.http_get_port: "8080"
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: postgresql
|
||||
name: postgresql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: postgresql
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: postgresql
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
name: postgresql
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
readinessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 8080
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- postgresql
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: postgresql:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: postgresql
|
||||
name: postgresql
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: postgresql
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.healthcheck.readiness.interval: 10s
|
||||
kompose.service.healthcheck.readiness.retries: "5"
|
||||
kompose.service.healthcheck.readiness.test: echo "liveness"
|
||||
kompose.service.healthcheck.readiness.timeout: 1s
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- echo "liveness"
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- echo
|
||||
- liveness
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- redis
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: redis
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "bar",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "bar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 99,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "bar"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "bar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "bar",
|
||||
"image": "bar",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 3,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "foo",
|
||||
"image": "foo",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
53
script/test/fixtures/multiple-files/output-k8s.yaml
vendored
Normal file
53
script/test/fixtures/multiple-files/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: bar
|
||||
name: bar
|
||||
spec:
|
||||
replicas: 99
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: bar
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: bar
|
||||
spec:
|
||||
containers:
|
||||
- image: bar
|
||||
name: bar
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: foo
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
spec:
|
||||
containers:
|
||||
- image: foo
|
||||
name: foo
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
205
script/test/fixtures/multiple-files/output-ocp.json
vendored
205
script/test/fixtures/multiple-files/output-ocp.json
vendored
@ -1,205 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "bar",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "bar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"bar"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "bar:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 99,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "bar"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "bar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "bar",
|
||||
"image": " ",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "bar",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "bar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "bar"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"foo"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "foo:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 3,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "foo",
|
||||
"image": " ",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "foo"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
136
script/test/fixtures/multiple-files/output-os.yaml
vendored
Normal file
136
script/test/fixtures/multiple-files/output-os.yaml
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: bar
|
||||
name: bar
|
||||
spec:
|
||||
replicas: 99
|
||||
selector:
|
||||
io.kompose.service: bar
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: bar
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: bar
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- bar
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: bar:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: bar
|
||||
name: bar
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: bar
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
io.kompose.service: foo
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: foo
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- foo
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: foo:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: foo
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
@ -1,200 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "persistentVolumeClaim"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "persistentVolumeClaim"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-data",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "db-data"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": "mysql",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-data",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-data",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db-data"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"configMap": {
|
||||
"name": "web-cm0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"configMap": {
|
||||
"name": "web-cm1",
|
||||
"items": [
|
||||
{
|
||||
"key": "a.key",
|
||||
"path": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": "nginx",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"mountPath": "/etc/tls"
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"mountPath": "/etc/test-a-key.key",
|
||||
"subPath": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.crt": "test-crt-data...",
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
128
script/test/fixtures/multiple-type-volumes/output-k8s.yaml
vendored
Normal file
128
script/test/fixtures/multiple-type-volumes/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: persistentVolumeClaim
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: persistentVolumeClaim
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: mysql
|
||||
name: db
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: db-data
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: db-data
|
||||
persistentVolumeClaim:
|
||||
claimName: db-data
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db-data
|
||||
name: db-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: web
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/tls
|
||||
name: web-cm0
|
||||
- mountPath: /etc/test-a-key.key
|
||||
name: web-cm1
|
||||
subPath: test-a-key.key
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
name: web-cm0
|
||||
name: web-cm0
|
||||
- configMap:
|
||||
items:
|
||||
- key: a.key
|
||||
path: test-a-key.key
|
||||
name: web-cm1
|
||||
name: web-cm1
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.crt: test-crt-data...
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm1
|
||||
|
||||
@ -1,312 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "persistentVolumeClaim"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"db"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "db:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-data",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "db-data"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": " ",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-data",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "mysql"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-data",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db-data"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.volume.type": "configMap"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"web"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "web:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"configMap": {
|
||||
"name": "web-cm0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"configMap": {
|
||||
"name": "web-cm1",
|
||||
"items": [
|
||||
{
|
||||
"key": "a.key",
|
||||
"path": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": " ",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "web-cm0",
|
||||
"mountPath": "/etc/tls"
|
||||
},
|
||||
{
|
||||
"name": "web-cm1",
|
||||
"mountPath": "/etc/test-a-key.key",
|
||||
"subPath": "test-a-key.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "nginx"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.crt": "test-crt-data...",
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ConfigMap",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web-cm1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "web"
|
||||
},
|
||||
"annotations": {
|
||||
"use-subpath": "true"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"a.key": "test-key-data...."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
206
script/test/fixtures/multiple-type-volumes/output-os.yaml
vendored
Normal file
206
script/test/fixtures/multiple-type-volumes/output-os.yaml
vendored
Normal file
@ -0,0 +1,206 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: persistentVolumeClaim
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: db
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: db-data
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: db-data
|
||||
persistentVolumeClaim:
|
||||
claimName: db-data
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- db
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: db:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: mysql
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db-data
|
||||
name: db-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.volume.type: configMap
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: web
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: web
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/tls
|
||||
name: web-cm0
|
||||
- mountPath: /etc/test-a-key.key
|
||||
name: web-cm1
|
||||
subPath: test-a-key.key
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- configMap:
|
||||
name: web-cm0
|
||||
name: web-cm0
|
||||
- configMap:
|
||||
items:
|
||||
- key: a.key
|
||||
path: test-a-key.key
|
||||
name: web-cm1
|
||||
name: web-cm1
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- web
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: web:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: nginx
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.crt: test-crt-data...
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
a.key: test-key-data....
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
use-subpath: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: web
|
||||
name: web-cm1
|
||||
|
||||
139
script/test/fixtures/service-group/output-k8s.json
vendored
139
script/test/fixtures/service-group/output-k8s.json
vendored
@ -1,139 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "librenms",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "librenms-dispatcher"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 8000
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "librenms-dispatcher"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "librenms-dispatcher",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "librenms-dispatcher"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "librenms-dispatcher"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "librenms-dispatcher"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "librenms-dispatcher-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "librenms-dispatcher-claim0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "librenms",
|
||||
"image": "librenms/librenms:latest",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8000
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "TZ",
|
||||
"value": "${TZ}"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "librenms-dispatcher-claim0",
|
||||
"mountPath": "/data"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dispatcher",
|
||||
"image": "librenms/dispatcher:latest",
|
||||
"env": [
|
||||
{
|
||||
"name": "TZ",
|
||||
"value": "${TZ}"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "librenms-dispatcher-claim0",
|
||||
"mountPath": "/data"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
"hostname": "dispatcher"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "librenms-dispatcher-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "librenms-dispatcher-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
84
script/test/fixtures/service-group/output-k8s.yaml
vendored
Normal file
84
script/test/fixtures/service-group/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: librenms-dispatcher
|
||||
name: librenms
|
||||
spec:
|
||||
ports:
|
||||
- name: "8000"
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
selector:
|
||||
io.kompose.service: librenms-dispatcher
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: librenms-dispatcher
|
||||
name: librenms-dispatcher
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: librenms-dispatcher
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: librenms-dispatcher
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: TZ
|
||||
value: ${TZ}
|
||||
image: librenms/librenms:latest
|
||||
name: librenms
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: librenms-dispatcher-claim0
|
||||
- env:
|
||||
- name: TZ
|
||||
value: ${TZ}
|
||||
image: librenms/dispatcher:latest
|
||||
name: dispatcher
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: librenms-dispatcher-claim0
|
||||
hostname: dispatcher
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: librenms-dispatcher-claim0
|
||||
persistentVolumeClaim:
|
||||
claimName: librenms-dispatcher-claim0
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: librenms-dispatcher-claim0
|
||||
name: librenms-dispatcher-claim0
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
|
||||
12
script/test/fixtures/single-file-output/docker-compose.yaml
vendored
Normal file
12
script/test/fixtures/single-file-output/docker-compose.yaml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
front_end:
|
||||
image: gcr.io/google-samples/gb-frontend:v4
|
||||
ports:
|
||||
- "80:80"
|
||||
environment:
|
||||
- GET_HOSTS_FROM=dns
|
||||
labels:
|
||||
kompose.service.expose: lb
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
85
script/test/fixtures/single-file-output/output-k8s.yaml
vendored
Normal file
85
script/test/fixtures/single-file-output/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: lb
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: front-end
|
||||
name: front_end
|
||||
spec:
|
||||
ports:
|
||||
- name: "80"
|
||||
port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
io.kompose.service: front-end
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: lb
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: front-end
|
||||
name: front-end
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: front-end
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: lb
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: front-end
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: GET_HOSTS_FROM
|
||||
value: dns
|
||||
image: gcr.io/google-samples/gb-frontend:v4
|
||||
name: front-end
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.expose: lb
|
||||
kompose.service.expose.ingress-class-name: nginx
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: front-end
|
||||
name: front-end
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: lb
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: front-end
|
||||
port:
|
||||
number: 80
|
||||
path: /
|
||||
pathType: Prefix
|
||||
status:
|
||||
loadBalancer: {}
|
||||
249
script/test/fixtures/statefulset/output-k8s.json
vendored
249
script/test/fixtures/statefulset/output-k8s.json
vendored
@ -1,249 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "3306",
|
||||
"port": 3306,
|
||||
"targetPort": 3306
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"clusterIP": "None",
|
||||
"type": "ClusterIP"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "wordpress",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 80
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "wordpress"
|
||||
},
|
||||
"clusterIP": "None",
|
||||
"type": "ClusterIP"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "StatefulSet",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": "mysql:5.7",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3306
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "MYSQL_DATABASE",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_PASSWORD",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_ROOT_PASSWORD",
|
||||
"value": "somewordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_USER",
|
||||
"value": "wordpress"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-data",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"volumeClaimTemplates": [
|
||||
{
|
||||
"metadata": {
|
||||
"name": "db-data",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db-data"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
],
|
||||
"serviceName": "db",
|
||||
"updateStrategy": {}
|
||||
},
|
||||
"status": {
|
||||
"replicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "StatefulSet",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "wordpress",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "wordpress",
|
||||
"image": "wordpress:latest",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "WORDPRESS_DB_HOST",
|
||||
"value": "db:3306"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_NAME",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_PASSWORD",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_USER",
|
||||
"value": "wordpress"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "wordpress-data",
|
||||
"mountPath": "/var/www/html"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"volumeClaimTemplates": [
|
||||
{
|
||||
"metadata": {
|
||||
"name": "wordpress-data",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress-data"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
],
|
||||
"serviceName": "wordpress",
|
||||
"updateStrategy": {}
|
||||
},
|
||||
"status": {
|
||||
"replicas": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
152
script/test/fixtures/statefulset/output-k8s.yaml
vendored
Normal file
152
script/test/fixtures/statefulset/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: "3306"
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
type: ClusterIP
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
name: wordpress
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: "8000"
|
||||
port: 8000
|
||||
targetPort: 80
|
||||
selector:
|
||||
io.kompose.service: wordpress
|
||||
type: ClusterIP
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: db
|
||||
serviceName: db
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: MYSQL_DATABASE
|
||||
value: wordpress
|
||||
- name: MYSQL_PASSWORD
|
||||
value: wordpress
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: somewordpress
|
||||
- name: MYSQL_USER
|
||||
value: wordpress
|
||||
image: mysql:5.7
|
||||
name: db
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: db-data
|
||||
restartPolicy: Always
|
||||
updateStrategy: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db-data
|
||||
name: db-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
status:
|
||||
replicas: 0
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
name: wordpress
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: wordpress
|
||||
serviceName: wordpress
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: WORDPRESS_DB_HOST
|
||||
value: db:3306
|
||||
- name: WORDPRESS_DB_NAME
|
||||
value: wordpress
|
||||
- name: WORDPRESS_DB_PASSWORD
|
||||
value: wordpress
|
||||
- name: WORDPRESS_DB_USER
|
||||
value: wordpress
|
||||
image: wordpress:latest
|
||||
name: wordpress
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: wordpress-data
|
||||
restartPolicy: Always
|
||||
updateStrategy: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress-data
|
||||
name: wordpress-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
status:
|
||||
replicas: 0
|
||||
|
||||
503
script/test/fixtures/statefulset/output-os.json
vendored
503
script/test/fixtures/statefulset/output-os.json
vendored
@ -1,503 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "3306",
|
||||
"port": 3306,
|
||||
"targetPort": 3306
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "wordpress",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 80
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "StatefulSet",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": "mysql:5.7",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3306
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "MYSQL_DATABASE",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_PASSWORD",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_ROOT_PASSWORD",
|
||||
"value": "somewordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_USER",
|
||||
"value": "wordpress"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-data",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"volumeClaimTemplates": [
|
||||
{
|
||||
"metadata": {
|
||||
"name": "db-data",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db-data"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
],
|
||||
"serviceName": "db",
|
||||
"updateStrategy": {}
|
||||
},
|
||||
"status": {
|
||||
"replicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"db"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "db:5.7"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3306
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "MYSQL_DATABASE",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_PASSWORD",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_ROOT_PASSWORD",
|
||||
"value": "somewordpress"
|
||||
},
|
||||
{
|
||||
"name": "MYSQL_USER",
|
||||
"value": "wordpress"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-data",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "5.7",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "mysql:5.7"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "StatefulSet",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "wordpress",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "wordpress",
|
||||
"image": "wordpress:latest",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "WORDPRESS_DB_HOST",
|
||||
"value": "db:3306"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_NAME",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_PASSWORD",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_USER",
|
||||
"value": "wordpress"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "wordpress-data",
|
||||
"mountPath": "/var/www/html"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"volumeClaimTemplates": [
|
||||
{
|
||||
"metadata": {
|
||||
"name": "wordpress-data",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress-data"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
],
|
||||
"serviceName": "wordpress",
|
||||
"updateStrategy": {}
|
||||
},
|
||||
"status": {
|
||||
"replicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "wordpress",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"wordpress"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "wordpress:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "wordpress"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "wordpress",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "WORDPRESS_DB_HOST",
|
||||
"value": "db:3306"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_NAME",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_PASSWORD",
|
||||
"value": "wordpress"
|
||||
},
|
||||
{
|
||||
"name": "WORDPRESS_DB_USER",
|
||||
"value": "wordpress"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "wordpress-data",
|
||||
"mountPath": "/var/www/html"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "wordpress",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "wordpress"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "wordpress:latest"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
314
script/test/fixtures/statefulset/output-os.yaml
vendored
Normal file
314
script/test/fixtures/statefulset/output-os.yaml
vendored
Normal file
@ -0,0 +1,314 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
ports:
|
||||
- name: "3306"
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
name: wordpress
|
||||
spec:
|
||||
ports:
|
||||
- name: "8000"
|
||||
port: 8000
|
||||
targetPort: 80
|
||||
selector:
|
||||
io.kompose.service: wordpress
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: db
|
||||
serviceName: db
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: MYSQL_DATABASE
|
||||
value: wordpress
|
||||
- name: MYSQL_PASSWORD
|
||||
value: wordpress
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: somewordpress
|
||||
- name: MYSQL_USER
|
||||
value: wordpress
|
||||
image: mysql:5.7
|
||||
name: db
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: db-data
|
||||
restartPolicy: Always
|
||||
updateStrategy: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db-data
|
||||
name: db-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
status:
|
||||
replicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: MYSQL_DATABASE
|
||||
value: wordpress
|
||||
- name: MYSQL_PASSWORD
|
||||
value: wordpress
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: somewordpress
|
||||
- name: MYSQL_USER
|
||||
value: wordpress
|
||||
image: ' '
|
||||
name: db
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: db-data
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- db
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: db:5.7
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: mysql:5.7
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: "5.7"
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
name: wordpress
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: wordpress
|
||||
serviceName: wordpress
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: WORDPRESS_DB_HOST
|
||||
value: db:3306
|
||||
- name: WORDPRESS_DB_NAME
|
||||
value: wordpress
|
||||
- name: WORDPRESS_DB_PASSWORD
|
||||
value: wordpress
|
||||
- name: WORDPRESS_DB_USER
|
||||
value: wordpress
|
||||
image: wordpress:latest
|
||||
name: wordpress
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: wordpress-data
|
||||
restartPolicy: Always
|
||||
updateStrategy: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress-data
|
||||
name: wordpress-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
status:
|
||||
replicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
name: wordpress
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: wordpress
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: WORDPRESS_DB_HOST
|
||||
value: db:3306
|
||||
- name: WORDPRESS_DB_NAME
|
||||
value: wordpress
|
||||
- name: WORDPRESS_DB_PASSWORD
|
||||
value: wordpress
|
||||
- name: WORDPRESS_DB_USER
|
||||
value: wordpress
|
||||
image: ' '
|
||||
name: wordpress
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: wordpress-data
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- wordpress
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: wordpress:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: wordpress
|
||||
name: wordpress
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: wordpress:latest
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
397
script/test/fixtures/v2/output-k8s.json
vendored
397
script/test/fixtures/v2/output-k8s.json
vendored
@ -1,397 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
},
|
||||
{
|
||||
"name": "6379-udp",
|
||||
"protocol": "UDP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
},
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3000-tcp",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3001",
|
||||
"port": 3001,
|
||||
"targetPort": 3001
|
||||
},
|
||||
{
|
||||
"name": "3002",
|
||||
"port": 3002,
|
||||
"targetPort": 3002
|
||||
},
|
||||
{
|
||||
"name": "3003",
|
||||
"port": 3003,
|
||||
"targetPort": 3003
|
||||
},
|
||||
{
|
||||
"name": "3004",
|
||||
"port": 3004,
|
||||
"targetPort": 3004
|
||||
},
|
||||
{
|
||||
"name": "3005",
|
||||
"port": 3005,
|
||||
"targetPort": 3005
|
||||
},
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 8000
|
||||
},
|
||||
{
|
||||
"name": "9090",
|
||||
"port": 9090,
|
||||
"targetPort": 8080
|
||||
},
|
||||
{
|
||||
"name": "9091",
|
||||
"port": 9091,
|
||||
"targetPort": 8081
|
||||
},
|
||||
{
|
||||
"name": "49100",
|
||||
"port": 49100,
|
||||
"targetPort": 22
|
||||
},
|
||||
{
|
||||
"name": "8001",
|
||||
"port": 8001,
|
||||
"targetPort": 8001
|
||||
},
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "5001",
|
||||
"port": 5001,
|
||||
"targetPort": 5001
|
||||
},
|
||||
{
|
||||
"name": "5002",
|
||||
"port": 5002,
|
||||
"targetPort": 5002
|
||||
},
|
||||
{
|
||||
"name": "5003",
|
||||
"port": 5003,
|
||||
"targetPort": 5003
|
||||
},
|
||||
{
|
||||
"name": "5004",
|
||||
"port": 5004,
|
||||
"targetPort": 5004
|
||||
},
|
||||
{
|
||||
"name": "5005",
|
||||
"port": 5005,
|
||||
"targetPort": 5005
|
||||
},
|
||||
{
|
||||
"name": "5006",
|
||||
"port": 5006,
|
||||
"targetPort": 5006
|
||||
},
|
||||
{
|
||||
"name": "5007",
|
||||
"port": 5007,
|
||||
"targetPort": 5007
|
||||
},
|
||||
{
|
||||
"name": "5008",
|
||||
"port": 5008,
|
||||
"targetPort": 5008
|
||||
},
|
||||
{
|
||||
"name": "5009",
|
||||
"port": 5009,
|
||||
"targetPort": 5009
|
||||
},
|
||||
{
|
||||
"name": "5010",
|
||||
"port": 5010,
|
||||
"targetPort": 5010
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-tcp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-tcp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-udp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-udp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "1234",
|
||||
"protocol": "UDP",
|
||||
"port": 1234,
|
||||
"targetPort": 1235
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Pod",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "foo",
|
||||
"image": "foobar",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
},
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "UDP"
|
||||
},
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 3001
|
||||
},
|
||||
{
|
||||
"containerPort": 3002
|
||||
},
|
||||
{
|
||||
"containerPort": 3003
|
||||
},
|
||||
{
|
||||
"containerPort": 3004
|
||||
},
|
||||
{
|
||||
"containerPort": 3005
|
||||
},
|
||||
{
|
||||
"containerPort": 8000
|
||||
},
|
||||
{
|
||||
"containerPort": 8080
|
||||
},
|
||||
{
|
||||
"containerPort": 8081
|
||||
},
|
||||
{
|
||||
"containerPort": 22
|
||||
},
|
||||
{
|
||||
"containerPort": 8001,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5001,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5002,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5003,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5004,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5005,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5006,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5007,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5008,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5009,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5010,
|
||||
"hostIP": "127.0.0.1"
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "GITHUB",
|
||||
"value": "surajssd"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "10e3"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Never",
|
||||
"securityContext": {
|
||||
"supplementalGroups": [
|
||||
1234
|
||||
]
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis:3.0",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
},
|
||||
{
|
||||
"containerPort": 1235,
|
||||
"protocol": "UDP"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "10485760e3"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
233
script/test/fixtures/v2/output-k8s.yaml
vendored
Normal file
233
script/test/fixtures/v2/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,233 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
- name: 6379-udp
|
||||
port: 6379
|
||||
protocol: UDP
|
||||
targetPort: 6379
|
||||
- name: "3000"
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
- name: 3000-tcp
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
- name: "3001"
|
||||
port: 3001
|
||||
targetPort: 3001
|
||||
- name: "3002"
|
||||
port: 3002
|
||||
targetPort: 3002
|
||||
- name: "3003"
|
||||
port: 3003
|
||||
targetPort: 3003
|
||||
- name: "3004"
|
||||
port: 3004
|
||||
targetPort: 3004
|
||||
- name: "3005"
|
||||
port: 3005
|
||||
targetPort: 3005
|
||||
- name: "8000"
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
- name: "9090"
|
||||
port: 9090
|
||||
targetPort: 8080
|
||||
- name: "9091"
|
||||
port: 9091
|
||||
targetPort: 8081
|
||||
- name: "49100"
|
||||
port: 49100
|
||||
targetPort: 22
|
||||
- name: "8001"
|
||||
port: 8001
|
||||
targetPort: 8001
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
- name: "5001"
|
||||
port: 5001
|
||||
targetPort: 5001
|
||||
- name: "5002"
|
||||
port: 5002
|
||||
targetPort: 5002
|
||||
- name: "5003"
|
||||
port: 5003
|
||||
targetPort: 5003
|
||||
- name: "5004"
|
||||
port: 5004
|
||||
targetPort: 5004
|
||||
- name: "5005"
|
||||
port: 5005
|
||||
targetPort: 5005
|
||||
- name: "5006"
|
||||
port: 5006
|
||||
targetPort: 5006
|
||||
- name: "5007"
|
||||
port: 5007
|
||||
targetPort: 5007
|
||||
- name: "5008"
|
||||
port: 5008
|
||||
targetPort: 5008
|
||||
- name: "5009"
|
||||
port: 5009
|
||||
targetPort: 5009
|
||||
- name: "5010"
|
||||
port: 5010
|
||||
targetPort: 5010
|
||||
selector:
|
||||
io.kompose.service: foo
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: loadbalancer
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis-tcp
|
||||
name: redis-tcp
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
type: LoadBalancer
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: loadbalancer
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis-udp
|
||||
name: redis-udp
|
||||
spec:
|
||||
ports:
|
||||
- name: "1234"
|
||||
port: 1234
|
||||
protocol: UDP
|
||||
targetPort: 1235
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
type: LoadBalancer
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: GITHUB
|
||||
value: surajssd
|
||||
image: foobar
|
||||
name: foo
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
- containerPort: 6379
|
||||
protocol: UDP
|
||||
- containerPort: 3000
|
||||
- containerPort: 3001
|
||||
- containerPort: 3002
|
||||
- containerPort: 3003
|
||||
- containerPort: 3004
|
||||
- containerPort: 3005
|
||||
- containerPort: 8000
|
||||
- containerPort: 8080
|
||||
- containerPort: 8081
|
||||
- containerPort: 22
|
||||
- containerPort: 8001
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5000
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5001
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5002
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5003
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5004
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5005
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5006
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5007
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5008
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5009
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5010
|
||||
hostIP: 127.0.0.1
|
||||
resources:
|
||||
limits:
|
||||
memory: "10e3"
|
||||
restartPolicy: Never
|
||||
securityContext:
|
||||
supplementalGroups:
|
||||
- 1234
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: loadbalancer
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: loadbalancer
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis:3.0
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
- containerPort: 1235
|
||||
protocol: UDP
|
||||
resources:
|
||||
limits:
|
||||
memory: "10485760e3"
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
454
script/test/fixtures/v2/output-os.json
vendored
454
script/test/fixtures/v2/output-os.json
vendored
@ -1,454 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
},
|
||||
{
|
||||
"name": "6379-udp",
|
||||
"protocol": "UDP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
},
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3000-tcp",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3001",
|
||||
"port": 3001,
|
||||
"targetPort": 3001
|
||||
},
|
||||
{
|
||||
"name": "3002",
|
||||
"port": 3002,
|
||||
"targetPort": 3002
|
||||
},
|
||||
{
|
||||
"name": "3003",
|
||||
"port": 3003,
|
||||
"targetPort": 3003
|
||||
},
|
||||
{
|
||||
"name": "3004",
|
||||
"port": 3004,
|
||||
"targetPort": 3004
|
||||
},
|
||||
{
|
||||
"name": "3005",
|
||||
"port": 3005,
|
||||
"targetPort": 3005
|
||||
},
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 8000
|
||||
},
|
||||
{
|
||||
"name": "9090",
|
||||
"port": 9090,
|
||||
"targetPort": 8080
|
||||
},
|
||||
{
|
||||
"name": "9091",
|
||||
"port": 9091,
|
||||
"targetPort": 8081
|
||||
},
|
||||
{
|
||||
"name": "49100",
|
||||
"port": 49100,
|
||||
"targetPort": 22
|
||||
},
|
||||
{
|
||||
"name": "8001",
|
||||
"port": 8001,
|
||||
"targetPort": 8001
|
||||
},
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "5001",
|
||||
"port": 5001,
|
||||
"targetPort": 5001
|
||||
},
|
||||
{
|
||||
"name": "5002",
|
||||
"port": 5002,
|
||||
"targetPort": 5002
|
||||
},
|
||||
{
|
||||
"name": "5003",
|
||||
"port": 5003,
|
||||
"targetPort": 5003
|
||||
},
|
||||
{
|
||||
"name": "5004",
|
||||
"port": 5004,
|
||||
"targetPort": 5004
|
||||
},
|
||||
{
|
||||
"name": "5005",
|
||||
"port": 5005,
|
||||
"targetPort": 5005
|
||||
},
|
||||
{
|
||||
"name": "5006",
|
||||
"port": 5006,
|
||||
"targetPort": 5006
|
||||
},
|
||||
{
|
||||
"name": "5007",
|
||||
"port": 5007,
|
||||
"targetPort": 5007
|
||||
},
|
||||
{
|
||||
"name": "5008",
|
||||
"port": 5008,
|
||||
"targetPort": 5008
|
||||
},
|
||||
{
|
||||
"name": "5009",
|
||||
"port": 5009,
|
||||
"targetPort": 5009
|
||||
},
|
||||
{
|
||||
"name": "5010",
|
||||
"port": 5010,
|
||||
"targetPort": 5010
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-tcp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-tcp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-udp",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-udp"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "1234",
|
||||
"protocol": "UDP",
|
||||
"port": 1234,
|
||||
"targetPort": 1235
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Pod",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "foo",
|
||||
"image": "foobar",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
},
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "UDP"
|
||||
},
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 3001
|
||||
},
|
||||
{
|
||||
"containerPort": 3002
|
||||
},
|
||||
{
|
||||
"containerPort": 3003
|
||||
},
|
||||
{
|
||||
"containerPort": 3004
|
||||
},
|
||||
{
|
||||
"containerPort": 3005
|
||||
},
|
||||
{
|
||||
"containerPort": 8000
|
||||
},
|
||||
{
|
||||
"containerPort": 8080
|
||||
},
|
||||
{
|
||||
"containerPort": 8081
|
||||
},
|
||||
{
|
||||
"containerPort": 22
|
||||
},
|
||||
{
|
||||
"containerPort": 8001,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5001,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5002,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5003,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5004,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5005,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5006,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5007,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5008,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5009,
|
||||
"hostIP": "127.0.0.1"
|
||||
},
|
||||
{
|
||||
"containerPort": 5010,
|
||||
"hostIP": "127.0.0.1"
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "GITHUB",
|
||||
"value": "surajssd"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "10e3"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Never",
|
||||
"securityContext": {
|
||||
"supplementalGroups": [
|
||||
1234
|
||||
]
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "loadbalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
},
|
||||
{
|
||||
"containerPort": 1235,
|
||||
"protocol": "UDP"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "10485760e3"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "3.0",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis:3.0"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
272
script/test/fixtures/v2/output-os.yaml
vendored
Normal file
272
script/test/fixtures/v2/output-os.yaml
vendored
Normal file
@ -0,0 +1,272 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
- name: 6379-udp
|
||||
port: 6379
|
||||
protocol: UDP
|
||||
targetPort: 6379
|
||||
- name: "3000"
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
- name: 3000-tcp
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
- name: "3001"
|
||||
port: 3001
|
||||
targetPort: 3001
|
||||
- name: "3002"
|
||||
port: 3002
|
||||
targetPort: 3002
|
||||
- name: "3003"
|
||||
port: 3003
|
||||
targetPort: 3003
|
||||
- name: "3004"
|
||||
port: 3004
|
||||
targetPort: 3004
|
||||
- name: "3005"
|
||||
port: 3005
|
||||
targetPort: 3005
|
||||
- name: "8000"
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
- name: "9090"
|
||||
port: 9090
|
||||
targetPort: 8080
|
||||
- name: "9091"
|
||||
port: 9091
|
||||
targetPort: 8081
|
||||
- name: "49100"
|
||||
port: 49100
|
||||
targetPort: 22
|
||||
- name: "8001"
|
||||
port: 8001
|
||||
targetPort: 8001
|
||||
- name: "5000"
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
- name: "5001"
|
||||
port: 5001
|
||||
targetPort: 5001
|
||||
- name: "5002"
|
||||
port: 5002
|
||||
targetPort: 5002
|
||||
- name: "5003"
|
||||
port: 5003
|
||||
targetPort: 5003
|
||||
- name: "5004"
|
||||
port: 5004
|
||||
targetPort: 5004
|
||||
- name: "5005"
|
||||
port: 5005
|
||||
targetPort: 5005
|
||||
- name: "5006"
|
||||
port: 5006
|
||||
targetPort: 5006
|
||||
- name: "5007"
|
||||
port: 5007
|
||||
targetPort: 5007
|
||||
- name: "5008"
|
||||
port: 5008
|
||||
targetPort: 5008
|
||||
- name: "5009"
|
||||
port: 5009
|
||||
targetPort: 5009
|
||||
- name: "5010"
|
||||
port: 5010
|
||||
targetPort: 5010
|
||||
selector:
|
||||
io.kompose.service: foo
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: loadbalancer
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis-tcp
|
||||
name: redis-tcp
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
type: LoadBalancer
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: loadbalancer
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis-udp
|
||||
name: redis-udp
|
||||
spec:
|
||||
ports:
|
||||
- name: "1234"
|
||||
port: 1234
|
||||
protocol: UDP
|
||||
targetPort: 1235
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
type: LoadBalancer
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: GITHUB
|
||||
value: surajssd
|
||||
image: foobar
|
||||
name: foo
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
- containerPort: 6379
|
||||
protocol: UDP
|
||||
- containerPort: 3000
|
||||
- containerPort: 3001
|
||||
- containerPort: 3002
|
||||
- containerPort: 3003
|
||||
- containerPort: 3004
|
||||
- containerPort: 3005
|
||||
- containerPort: 8000
|
||||
- containerPort: 8080
|
||||
- containerPort: 8081
|
||||
- containerPort: 22
|
||||
- containerPort: 8001
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5000
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5001
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5002
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5003
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5004
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5005
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5006
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5007
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5008
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5009
|
||||
hostIP: 127.0.0.1
|
||||
- containerPort: 5010
|
||||
hostIP: 127.0.0.1
|
||||
resources:
|
||||
limits:
|
||||
memory: "10e3"
|
||||
restartPolicy: Never
|
||||
securityContext:
|
||||
supplementalGroups:
|
||||
- 1234
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: loadbalancer
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
- containerPort: 1235
|
||||
protocol: UDP
|
||||
resources:
|
||||
limits:
|
||||
memory: "10485760e3"
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- redis
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:3.0
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: redis:3.0
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: "3.0"
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
223
script/test/fixtures/v3.0/output-k8s.json
vendored
223
script/test/fixtures/v3.0/output-k8s.json
vendored
@ -1,223 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.network/app-network": "true",
|
||||
"io.kompose.network/normalized-network": "true",
|
||||
"io.kompose.network/web-network": "true",
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "foo",
|
||||
"image": "foo:latest",
|
||||
"args": [
|
||||
"sh",
|
||||
"-c",
|
||||
"echo Hello Foo"
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "networking.k8s.io/v1",
|
||||
"metadata": {
|
||||
"name": "app-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/app-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/app-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "networking.k8s.io/v1",
|
||||
"metadata": {
|
||||
"name": "normalized-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/normalized-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/normalized-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "networking.k8s.io/v1",
|
||||
"metadata": {
|
||||
"name": "web-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/web-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/web-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis",
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"exec": {
|
||||
"command": [
|
||||
"echo \"hello world\""
|
||||
]
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
141
script/test/fixtures/v3.0/output-k8s.yaml
vendored
Normal file
141
script/test/fixtures/v3.0/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: headless
|
||||
port: 55555
|
||||
targetPort: 0
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: foo
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.network/app-network: "true"
|
||||
io.kompose.network/normalized-network: "true"
|
||||
io.kompose.network/web-network: "true"
|
||||
io.kompose.service: foo
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- sh
|
||||
- -c
|
||||
- echo Hello Foo
|
||||
image: foo:latest
|
||||
name: foo
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: app-network
|
||||
spec:
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
io.kompose.network/app-network: "true"
|
||||
podSelector:
|
||||
matchLabels:
|
||||
io.kompose.network/app-network: "true"
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: web-network
|
||||
spec:
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
io.kompose.network/web-network: "true"
|
||||
podSelector:
|
||||
matchLabels:
|
||||
io.kompose.network/web-network: "true"
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: normalized-network
|
||||
spec:
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
io.kompose.network/normalized-network: "true"
|
||||
podSelector:
|
||||
matchLabels:
|
||||
io.kompose.network/normalized-network: "true"
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- echo "hello world"
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
name: redis
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
status: {}
|
||||
|
||||
256
script/test/fixtures/v3.0/output-os.json
vendored
256
script/test/fixtures/v3.0/output-os.json
vendored
@ -1,256 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"foo"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "foo:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.network/app-network": "true",
|
||||
"io.kompose.network/normalized-network": "true",
|
||||
"io.kompose.network/web-network": "true",
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "foo",
|
||||
"image": " ",
|
||||
"args": [
|
||||
"sh",
|
||||
"-c",
|
||||
"echo Hello Foo"
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "foo:latest"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "headless"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"resources": {},
|
||||
"livenessProbe": {
|
||||
"exec": {
|
||||
"command": [
|
||||
"echo \"hello world\""
|
||||
]
|
||||
},
|
||||
"timeoutSeconds": 1,
|
||||
"periodSeconds": 10,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
173
script/test/fixtures/v3.0/output-os.yaml
vendored
Normal file
173
script/test/fixtures/v3.0/output-os.yaml
vendored
Normal file
@ -0,0 +1,173 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: headless
|
||||
port: 55555
|
||||
targetPort: 0
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: foo
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.network/app-network: "true"
|
||||
io.kompose.network/normalized-network: "true"
|
||||
io.kompose.network/web-network: "true"
|
||||
io.kompose.service: foo
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- sh
|
||||
- -c
|
||||
- echo Hello Foo
|
||||
image: ' '
|
||||
name: foo
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- foo
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: foo:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: foo
|
||||
name: foo
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: foo:latest
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.service.type: headless
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: redis
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- echo "hello world"
|
||||
failureThreshold: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
name: redis
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- redis
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: redis:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: redis
|
||||
name: redis
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: redis
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
@ -1,115 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "80",
|
||||
"port": 80,
|
||||
"targetPort": 80
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "db-claim0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": "nginx:latest",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-claim0",
|
||||
"mountPath": "D:\\config"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
71
script/test/fixtures/volume-mounts/windows/output-k8s.yaml
vendored
Normal file
71
script/test/fixtures/volume-mounts/windows/output-k8s.yaml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
ports:
|
||||
- name: "80"
|
||||
port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx:latest
|
||||
name: db
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: D:\config
|
||||
name: db-claim0
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: db-claim0
|
||||
persistentVolumeClaim:
|
||||
claimName: db-claim0
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db-claim0
|
||||
name: db-claim0
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
|
||||
@ -1,174 +0,0 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "80",
|
||||
"port": 80,
|
||||
"targetPort": 80
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"db"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "db:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "db"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "db-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "db-claim0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "db-claim0",
|
||||
"mountPath": "D:\\config"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "nginx:latest"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "db-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "db-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
112
script/test/fixtures/volume-mounts/windows/output-os.yaml
vendored
Normal file
112
script/test/fixtures/volume-mounts/windows/output-os.yaml
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
ports:
|
||||
- name: "80"
|
||||
port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
io.kompose.service: db
|
||||
strategy:
|
||||
resources: {}
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
spec:
|
||||
containers:
|
||||
- image: ' '
|
||||
name: db
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: D:\config
|
||||
name: db-claim0
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: db-claim0
|
||||
persistentVolumeClaim:
|
||||
claimName: db-claim0
|
||||
test: false
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- db
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: db:latest
|
||||
type: ImageChange
|
||||
status:
|
||||
availableReplicas: 0
|
||||
latestVersion: 0
|
||||
observedGeneration: 0
|
||||
replicas: 0
|
||||
unavailableReplicas: 0
|
||||
updatedReplicas: 0
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db
|
||||
name: db
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- annotations: null
|
||||
from:
|
||||
kind: DockerImage
|
||||
name: nginx:latest
|
||||
generation: null
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: ""
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: db-claim0
|
||||
name: db-claim0
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user