diff --git a/CHANGELOG.md b/CHANGELOG.md index ab0ad74513..1122b0fdcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,14 +51,14 @@ - Missing exe extension for windows release [\#1433](https://github.com/kubernetes/kompose/issues/1433) - is version of golangci-lint consistent with it github-ci [\#1422](https://github.com/kubernetes/kompose/issues/1422) - compatability issue with 64-bit version of windows [\#1415](https://github.com/kubernetes/kompose/issues/1415) -- Kompose generated network YAML cannot be applied because there are o matches for kind "NetworkPolicy" in version "extensions/v1beta1" [\#1408](https://github.com/kubernetes/kompose/issues/1408) +- Kompose generated network YAML cannot be applied because there are o matches for kind "NetworkPolicy" in version "extensions/v1beta1" [\#1408](https://github.com/kubernetes/kompose/issues/1408) - docker-compose 3.8 [\#1396](https://github.com/kubernetes/kompose/issues/1396) - 'Support for readinessProbe' is not include Kompose 1.22.0 [\#1384](https://github.com/kubernetes/kompose/issues/1384) - Is it possible to push image to custom container registry? [\#1369](https://github.com/kubernetes/kompose/issues/1369) - Windows Binaries for 1.22 not updated correctly [\#1347](https://github.com/kubernetes/kompose/issues/1347) -- Provide sha256 checksums as Assets instead of strings in a HTML table [\#1311](https://github.com/kubernetes/kompose/issues/1311) +- Provide sha256 checksums as Assets instead of strings in a HTML table [\#1311](https://github.com/kubernetes/kompose/issues/1311) - \[BUG\] Kompose doesn't read config from URL [\#1291](https://github.com/kubernetes/kompose/issues/1291) -- kompose convert Volume mount on the host isn't supported [\#1271](https://github.com/kubernetes/kompose/issues/1271) +- kompose convert Volume mount on the host isn't supported [\#1271](https://github.com/kubernetes/kompose/issues/1271) - Dotfile path \(e.g ./envs/./production/.envs\) errors/is not supported in Kompose [\#1240](https://github.com/kubernetes/kompose/issues/1240) - Create route for openshift - targert port should be a string [\#1184](https://github.com/kubernetes/kompose/issues/1184) - Support yaml anchors [\#1155](https://github.com/kubernetes/kompose/issues/1155) @@ -135,7 +135,7 @@ - add autocompletion for fish shell [\#1412](https://github.com/kubernetes/kompose/pull/1412) ([top](https://github.com/top)) - Fix build context [\#1411](https://github.com/kubernetes/kompose/pull/1411) ([lexcao](https://github.com/lexcao)) - Support custom registry on pushing image [\#1409](https://github.com/kubernetes/kompose/pull/1409) ([lexcao](https://github.com/lexcao)) -- Add "--pvc-request-size" new command line parameter [\#1406](https://github.com/kubernetes/kompose/pull/1406) ([ithaiq](https://github.com/ithaiq)) +- Add "--pvc-request-size" new command line parameter [\#1406](https://github.com/kubernetes/kompose/pull/1406) ([ithaiq](https://github.com/ithaiq)) - fix: --build flag default change to local [\#1405](https://github.com/kubernetes/kompose/pull/1405) ([zeromake](https://github.com/zeromake)) - Fix the selector field of service resource [\#1404](https://github.com/kubernetes/kompose/pull/1404) ([cnbailian](https://github.com/cnbailian)) - chore: update error for wrong volume type [\#1402](https://github.com/kubernetes/kompose/pull/1402) ([Yiyiyimu](https://github.com/Yiyiyimu)) @@ -172,7 +172,7 @@ - Ports are parsed incorrectly from "expose" [\#1321](https://github.com/kubernetes/kompose/issues/1321) - Build args not working [\#1319](https://github.com/kubernetes/kompose/issues/1319) - Need to update the api version in the auto-generated network policy [\#1318](https://github.com/kubernetes/kompose/issues/1318) -- Possibility to use default ingress ssl cert [\#1316](https://github.com/kubernetes/kompose/issues/1316) +- Possibility to use default ingress ssl cert [\#1316](https://github.com/kubernetes/kompose/issues/1316) - TLS host invalid when using kompose.service.expose with path [\#1315](https://github.com/kubernetes/kompose/issues/1315) - problems converting docker-compose file using local environment variables [\#1314](https://github.com/kubernetes/kompose/issues/1314) - FATA enviroment Additional property enviroment is not allowed [\#1310](https://github.com/kubernetes/kompose/issues/1310) @@ -192,7 +192,7 @@ - Losing quotes when converting "yes" and "no" [\#1253](https://github.com/kubernetes/kompose/issues/1253) - Error while deploying application: the server could not find the requested resource [\#1238](https://github.com/kubernetes/kompose/issues/1238) - no matches for kind "Deployment" in version "extensions/v1beta1" [\#1236](https://github.com/kubernetes/kompose/issues/1236) -- convert the 2.1 version docker-compose.yaml error!!!!! [\#1235](https://github.com/kubernetes/kompose/issues/1235) +- convert the 2.1 version docker-compose.yaml error!!!!! [\#1235](https://github.com/kubernetes/kompose/issues/1235) - Kompose doesn't work with docker-compose v3.7 [\#1152](https://github.com/kubernetes/kompose/issues/1152) **Merged pull requests:** @@ -249,7 +249,7 @@ - Deprecating kompose up and kompose down in favor of only kompose convert [\#1275](https://github.com/kubernetes/kompose/issues/1275) - Running kompose under k3s failed [\#1270](https://github.com/kubernetes/kompose/issues/1270) - Getting user and password prompt while doing Kompose up [\#1269](https://github.com/kubernetes/kompose/issues/1269) -- kompose response '\[1\] 77127 killed kompose' and does nothing [\#1268](https://github.com/kubernetes/kompose/issues/1268) +- kompose response '\[1\] 77127 killed kompose' and does nothing [\#1268](https://github.com/kubernetes/kompose/issues/1268) - .env file creates -env entries, no ConfigMap [\#1267](https://github.com/kubernetes/kompose/issues/1267) - Kompose not creating pods & deployments on minikube [\#1264](https://github.com/kubernetes/kompose/issues/1264) - Unable to read env\_file: Can't separate key from value [\#1263](https://github.com/kubernetes/kompose/issues/1263) @@ -266,7 +266,7 @@ - \[BUG\] Repeated resources in YAML file when --out flag is supplied [\#1239](https://github.com/kubernetes/kompose/issues/1239) - \[Feature\]: Validation of supported attributes within a docker-compose file [\#1237](https://github.com/kubernetes/kompose/issues/1237) - How do I start a POD with my transformed files [\#1234](https://github.com/kubernetes/kompose/issues/1234) -- Error while deploying application: Get http://localhost:8080/api: dial tcp \[::1\]:8080: connect: connection refused [\#1201](https://github.com/kubernetes/kompose/issues/1201) +- Error while deploying application: Get http://localhost:8080/api: dial tcp \[::1\]:8080: connect: connection refused [\#1201](https://github.com/kubernetes/kompose/issues/1201) - Error when i'm trying to convert my docker-compose [\#1130](https://github.com/kubernetes/kompose/issues/1130) - Labels not converted to annotations in ingress [\#1071](https://github.com/kubernetes/kompose/issues/1071) - Init Containers [\#1053](https://github.com/kubernetes/kompose/issues/1053) @@ -374,7 +374,7 @@ **Closed issues:** - Int Test Case correction for Network Translation Feature [\#1196](https://github.com/kubernetes/kompose/issues/1196) -- Proposal: Achieve Docker-Compose Network functionality using NetworkPolicy in Kubernates [\#1188](https://github.com/kubernetes/kompose/issues/1188) +- Proposal: Achieve Docker-Compose Network functionality using NetworkPolicy in Kubernates [\#1188](https://github.com/kubernetes/kompose/issues/1188) - Follow docker compose conventions for merging top level keys [\#1185](https://github.com/kubernetes/kompose/issues/1185) - Convert Helm to Docker-compose [\#1183](https://github.com/kubernetes/kompose/issues/1183) - Latest binary still not statically linked [\#1182](https://github.com/kubernetes/kompose/issues/1182) @@ -422,7 +422,7 @@ - `container\_name` was not converted to a valid identifier [\#1135](https://github.com/kubernetes/kompose/issues/1135) - Upgrade Deployment and DaemonSet [\#1133](https://github.com/kubernetes/kompose/issues/1133) - Trivial converted service is not reachable [\#1128](https://github.com/kubernetes/kompose/issues/1128) -- repository 'https://src.fedoraproject.org/cgit/rpms/kompose.git/' not found [\#1126](https://github.com/kubernetes/kompose/issues/1126) +- repository 'https://src.fedoraproject.org/cgit/rpms/kompose.git/' not found [\#1126](https://github.com/kubernetes/kompose/issues/1126) - go get failed [\#1124](https://github.com/kubernetes/kompose/issues/1124) - Fix dep [\#1119](https://github.com/kubernetes/kompose/issues/1119) - "kompose up" won't push to Google on Windows Subsystem for Linux [\#1117](https://github.com/kubernetes/kompose/issues/1117) @@ -432,7 +432,7 @@ - Support for PVC Access Mode ReadWriteMany [\#1046](https://github.com/kubernetes/kompose/issues/1046) - Add official docker image build [\#1045](https://github.com/kubernetes/kompose/issues/1045) - Kubernetes specific support in Compose [\#917](https://github.com/kubernetes/kompose/issues/917) -- Unable to push Docker image for service web: Unable to retrieve .docker/config.json authentication details. [\#911](https://github.com/kubernetes/kompose/issues/911) +- Unable to push Docker image for service web: Unable to retrieve .docker/config.json authentication details. [\#911](https://github.com/kubernetes/kompose/issues/911) - Rework "unsupported keys" prompt [\#788](https://github.com/kubernetes/kompose/issues/788) **Merged pull requests:** @@ -543,7 +543,7 @@ **Closed issues:** -- 'environment' with 'env-file' specified together for service in docker-compose.yml don't work [\#1013](https://github.com/kubernetes/kompose/issues/1013) +- 'environment' with 'env-file' specified together for service in docker-compose.yml don't work [\#1013](https://github.com/kubernetes/kompose/issues/1013) - kompose does not indicate key nor line number when printing error [\#915](https://github.com/kubernetes/kompose/issues/915) - error with autogenerated cluster name [\#713](https://github.com/kubernetes/kompose/issues/713) - kompose build fails: unable to create tarball [\#656](https://github.com/kubernetes/kompose/issues/656) @@ -626,7 +626,7 @@ **Closed issues:** -- Should we provide a go library to support the third-party integration ? [\#982](https://github.com/kubernetes/kompose/issues/982) +- Should we provide a go library to support the third-party integration ? [\#982](https://github.com/kubernetes/kompose/issues/982) - Minor typos in Makefile [\#971](https://github.com/kubernetes/kompose/issues/971) - panic: runtime error: invalid memory address or nil pointer dereference [\#892](https://github.com/kubernetes/kompose/issues/892) - kompose should read input from stdin [\#870](https://github.com/kubernetes/kompose/issues/870) @@ -721,7 +721,7 @@ - "panic: runtime error: invalid memory address or nil pointer dereference" when using environment unset variables [\#918](https://github.com/kubernetes/kompose/issues/918) - \[doc\] more tutorial for gcloud? [\#833](https://github.com/kubernetes/kompose/issues/833) - Cannot locate specified Dockerfile: Dockerfile [\#809](https://github.com/kubernetes/kompose/issues/809) -- kompose passes a kubernetes deployment without image [\#571](https://github.com/kubernetes/kompose/issues/571) +- kompose passes a kubernetes deployment without image [\#571](https://github.com/kubernetes/kompose/issues/571) - Support for sysctls [\#441](https://github.com/kubernetes/kompose/issues/441) **Merged pull requests:** @@ -770,7 +770,7 @@ - kompose build fails to read the context correctly [\#832](https://github.com/kubernetes/kompose/issues/832) - Build errors with current OpenShift cluster tests [\#752](https://github.com/kubernetes/kompose/issues/752) - kompose should give warning on providing blank environment variables [\#545](https://github.com/kubernetes/kompose/issues/545) -- Docker build fails: Failed to push image: unauthized:authentication required [\#496](https://github.com/kubernetes/kompose/issues/496) +- Docker build fails: Failed to push image: unauthized:authentication required [\#496](https://github.com/kubernetes/kompose/issues/496) - wrong git revision number in version output [\#422](https://github.com/kubernetes/kompose/issues/422) - publicly hosted API endpoint for kompose [\#419](https://github.com/kubernetes/kompose/issues/419) - Improve logging messages in unit tests [\#351](https://github.com/kubernetes/kompose/issues/351) @@ -819,8 +819,8 @@ **Merged pull requests:** - 1.5.0 Release [\#874](https://github.com/kubernetes/kompose/pull/874) ([cdrage](https://github.com/cdrage)) -- Set PVC volume size with kompose.volume.size [\#867](https://github.com/kubernetes/kompose/pull/867) ([abitrolly](https://github.com/abitrolly)) -- architecture.md Link sources [\#866](https://github.com/kubernetes/kompose/pull/866) ([abitrolly](https://github.com/abitrolly)) +- Set PVC volume size with kompose.volume.size [\#867](https://github.com/kubernetes/kompose/pull/867) ([abitrolly](https://github.com/abitrolly)) +- architecture.md Link sources [\#866](https://github.com/kubernetes/kompose/pull/866) ([abitrolly](https://github.com/abitrolly)) - Move version information to separate file [\#864](https://github.com/kubernetes/kompose/pull/864) ([cdrage](https://github.com/cdrage)) - Fix typo [\#863](https://github.com/kubernetes/kompose/pull/863) ([xianlubird](https://github.com/xianlubird)) - Ignore links attribute and print warning message [\#862](https://github.com/kubernetes/kompose/pull/862) ([xianlubird](https://github.com/xianlubird)) @@ -856,7 +856,7 @@ **Closed issues:** - `go vet` is failing locally [\#825](https://github.com/kubernetes/kompose/issues/825) -- `--volumes` is not validated [\#814](https://github.com/kubernetes/kompose/issues/814) +- `--volumes` is not validated [\#814](https://github.com/kubernetes/kompose/issues/814) - tmpfs with mode fails [\#807](https://github.com/kubernetes/kompose/issues/807) - Add --controller [\#792](https://github.com/kubernetes/kompose/issues/792) @@ -872,7 +872,7 @@ - Updated vendoring [\#828](https://github.com/kubernetes/kompose/pull/828) ([surajnarwade](https://github.com/surajnarwade)) - Fixed `go vet` [\#827](https://github.com/kubernetes/kompose/pull/827) ([surajnarwade](https://github.com/surajnarwade)) - Added `--build-repo` in `kompose up` [\#824](https://github.com/kubernetes/kompose/pull/824) ([surajnarwade](https://github.com/surajnarwade)) -- Adding --build-branch to `kompose up` [\#820](https://github.com/kubernetes/kompose/pull/820) ([surajnarwade](https://github.com/surajnarwade)) +- Adding --build-branch to `kompose up` [\#820](https://github.com/kubernetes/kompose/pull/820) ([surajnarwade](https://github.com/surajnarwade)) - Fixed `--volumes` validation [\#817](https://github.com/kubernetes/kompose/pull/817) ([surajnarwade](https://github.com/surajnarwade)) - Fixed tmpfs with mode failure [\#816](https://github.com/kubernetes/kompose/pull/816) ([surajnarwade](https://github.com/surajnarwade)) - Fix reference to emptyDir in OpenShift test scripts [\#815](https://github.com/kubernetes/kompose/pull/815) ([ashetty1](https://github.com/ashetty1)) @@ -905,8 +905,8 @@ - Add support for cpus \(Version 3 Resources Key\) [\#730](https://github.com/kubernetes/kompose/issues/730) - Deprecate Docker Compose Version 2.1, 2.2, and 3.3. Only support 1,2,3,4 \(future\). [\#725](https://github.com/kubernetes/kompose/issues/725) - Error running kompose on counter v3 example file [\#721](https://github.com/kubernetes/kompose/issues/721) -- Change imports for kompose packages to 'k8s.io/kompose" [\#719](https://github.com/kubernetes/kompose/issues/719) -- Distinguish / re-add ` $` to docs [\#718](https://github.com/kubernetes/kompose/issues/718) +- Change imports for kompose packages to 'k8s.io/kompose" [\#719](https://github.com/kubernetes/kompose/issues/719) +- Distinguish / re-add `$` to docs [\#718](https://github.com/kubernetes/kompose/issues/718) - Docker build in kompose convert [\#691](https://github.com/kubernetes/kompose/issues/691) - Move git functions in openshift.go into a separate package [\#640](https://github.com/kubernetes/kompose/issues/640) - Save the cmd used to create config [\#639](https://github.com/kubernetes/kompose/issues/639) @@ -918,7 +918,7 @@ - Support for: group\_add [\#437](https://github.com/kubernetes/kompose/issues/437) - kompose binary per merge? \(add nightlies\) [\#355](https://github.com/kubernetes/kompose/issues/355) - Add health checks [\#163](https://github.com/kubernetes/kompose/issues/163) -- Release process [\#70](https://github.com/kubernetes/kompose/issues/70) +- Release process [\#70](https://github.com/kubernetes/kompose/issues/70) **Merged pull requests:** @@ -957,7 +957,7 @@ - Add author to Kompose UI [\#742](https://github.com/kubernetes/kompose/pull/742) ([JadCham](https://github.com/JadCham)) - Update installation instructions [\#741](https://github.com/kubernetes/kompose/pull/741) ([cdrage](https://github.com/cdrage)) - Update integrations links [\#740](https://github.com/kubernetes/kompose/pull/740) ([cdrage](https://github.com/cdrage)) -- Added support for `group\_add` key [\#739](https://github.com/kubernetes/kompose/pull/739) ([surajnarwade](https://github.com/surajnarwade)) +- Added support for `group\_add` key [\#739](https://github.com/kubernetes/kompose/pull/739) ([surajnarwade](https://github.com/surajnarwade)) - Add CPU limit, CPU Reservation and Memory Reservation [\#738](https://github.com/kubernetes/kompose/pull/738) ([cdrage](https://github.com/cdrage)) - Add integration doc [\#736](https://github.com/kubernetes/kompose/pull/736) ([cdrage](https://github.com/cdrage)) - Add Windows instructions to installation.md [\#735](https://github.com/kubernetes/kompose/pull/735) ([cdrage](https://github.com/cdrage)) @@ -978,7 +978,7 @@ **Closed issues:** - adding timestamp in k8s artifacts [\#717](https://github.com/kubernetes/kompose/issues/717) -- Kompose latest release version info from version file [\#712](https://github.com/kubernetes/kompose/issues/712) +- Kompose latest release version info from version file [\#712](https://github.com/kubernetes/kompose/issues/712) - One Script to Run Them All [\#683](https://github.com/kubernetes/kompose/issues/683) - setting environment variable PROVIDER no longer works [\#678](https://github.com/kubernetes/kompose/issues/678) - kompose.service.type issues [\#673](https://github.com/kubernetes/kompose/issues/673) @@ -989,7 +989,7 @@ - v3 env substitution is not working [\#650](https://github.com/kubernetes/kompose/issues/650) - Docker Build/Push documentation [\#647](https://github.com/kubernetes/kompose/issues/647) - v3 Documentation [\#646](https://github.com/kubernetes/kompose/issues/646) -- Support restart\_policy in v3 docker compose [\#643](https://github.com/kubernetes/kompose/issues/643) +- Support restart\_policy in v3 docker compose [\#643](https://github.com/kubernetes/kompose/issues/643) - ports error on converting [\#633](https://github.com/kubernetes/kompose/issues/633) - Fix EnvSort so that env variables are populated properly [\#627](https://github.com/kubernetes/kompose/issues/627) - emptyvols option doesn't work for kompose convert/up [\#625](https://github.com/kubernetes/kompose/issues/625) @@ -997,7 +997,7 @@ - Add support for 'pid' key [\#610](https://github.com/kubernetes/kompose/issues/610) - Failing test should show diff [\#604](https://github.com/kubernetes/kompose/issues/604) - environment variables are populated in random order in the created artifacts. [\#595](https://github.com/kubernetes/kompose/issues/595) -- `kompose convert` should validate dockerfilepath [\#594](https://github.com/kubernetes/kompose/issues/594) +- `kompose convert` should validate dockerfilepath [\#594](https://github.com/kubernetes/kompose/issues/594) - Error with volume name with generated deployment file [\#584](https://github.com/kubernetes/kompose/issues/584) - kompose.service.type label not working as expected [\#522](https://github.com/kubernetes/kompose/issues/522) - Roadmap is out of date. [\#482](https://github.com/kubernetes/kompose/issues/482) @@ -1083,7 +1083,7 @@ **Closed issues:** - image tag name absent from generated imagestream config [\#611](https://github.com/kubernetes/kompose/issues/611) -- Volume mount on the host isn't supported [\#599](https://github.com/kubernetes/kompose/issues/599) +- Volume mount on the host isn't supported [\#599](https://github.com/kubernetes/kompose/issues/599) - Is this a case of buildconfig contextDir being incorrectly set? [\#593](https://github.com/kubernetes/kompose/issues/593) - Problems running tests with latest master? [\#591](https://github.com/kubernetes/kompose/issues/591) - crashes on launch [\#589](https://github.com/kubernetes/kompose/issues/589) @@ -1096,7 +1096,7 @@ - Inconsistency in build context [\#445](https://github.com/kubernetes/kompose/issues/445) - Support for: stop\_grace\_period [\#440](https://github.com/kubernetes/kompose/issues/440) - environment variables not being set in buildConfig [\#406](https://github.com/kubernetes/kompose/issues/406) -- kompose down with openshift doesn't delete BuildConfig [\#382](https://github.com/kubernetes/kompose/issues/382) +- kompose down with openshift doesn't delete BuildConfig [\#382](https://github.com/kubernetes/kompose/issues/382) **Merged pull requests:** @@ -1125,7 +1125,7 @@ **Closed issues:** - Support for cap\_add,cap\_drop [\#575](https://github.com/kubernetes/kompose/issues/575) -- commenting test case temporarily [\#564](https://github.com/kubernetes/kompose/issues/564) +- commenting test case temporarily [\#564](https://github.com/kubernetes/kompose/issues/564) - driver:local in prefixing volumes with current dir name [\#550](https://github.com/kubernetes/kompose/issues/550) - update docs/conversion.md [\#548](https://github.com/kubernetes/kompose/issues/548) - Kompose binary for ARM [\#541](https://github.com/kubernetes/kompose/issues/541) @@ -1198,7 +1198,7 @@ - Make kompose keep trying its job [\#270](https://github.com/kubernetes/kompose/issues/270) - Improving `down` to handle Volumes [\#255](https://github.com/kubernetes/kompose/issues/255) - Add tests based on current issues [\#205](https://github.com/kubernetes/kompose/issues/205) -- We should have a table / document for docker-compose to k8s / openshift conversion [\#82](https://github.com/kubernetes/kompose/issues/82) +- We should have a table / document for docker-compose to k8s / openshift conversion [\#82](https://github.com/kubernetes/kompose/issues/82) **Merged pull requests:** @@ -1281,12 +1281,12 @@ - By default, remove protocol: TCP in conversion to artifacts [\#392](https://github.com/kubernetes/kompose/issues/392) - Container Port and Node Port mapping default to open [\#391](https://github.com/kubernetes/kompose/issues/391) - panic on using --build-branch and default docker-compose file given [\#369](https://github.com/kubernetes/kompose/issues/369) -- error should be displayed If controller object is specified and `restart: on-failure` [\#354](https://github.com/kubernetes/kompose/issues/354) +- error should be displayed If controller object is specified and `restart: on-failure` [\#354](https://github.com/kubernetes/kompose/issues/354) - add support for docker-compose.yaml besides docker-compose.yml [\#352](https://github.com/kubernetes/kompose/issues/352) - Abstract out api.PodSpec in kubernetes.go [\#348](https://github.com/kubernetes/kompose/issues/348) - Support for host:container:protocol [\#335](https://github.com/kubernetes/kompose/issues/335) - Detecting exposed ports in images [\#146](https://github.com/kubernetes/kompose/issues/146) -- bash completion for kompose [\#37](https://github.com/kubernetes/kompose/issues/37) +- bash completion for kompose [\#37](https://github.com/kubernetes/kompose/issues/37) **Merged pull requests:** @@ -1328,7 +1328,7 @@ - Removing unconventional two letter flags + adding dashes in-between two letter words. [\#331](https://github.com/kubernetes/kompose/issues/331) - Determine group membership [\#327](https://github.com/kubernetes/kompose/issues/327) - kompose errors identifying string in docker-compose [\#320](https://github.com/kubernetes/kompose/issues/320) -- restart: Unsupported value: "OnFailure": supported values: Always [\#318](https://github.com/kubernetes/kompose/issues/318) +- restart: Unsupported value: "OnFailure": supported values: Always [\#318](https://github.com/kubernetes/kompose/issues/318) - Update roadmap / split into ROADMAP.md with relevant information [\#315](https://github.com/kubernetes/kompose/issues/315) - Replace godep with glide [\#314](https://github.com/kubernetes/kompose/issues/314) - Unable to run cmd tests under Debian. [\#309](https://github.com/kubernetes/kompose/issues/309) @@ -1345,7 +1345,7 @@ - Support multiple compose files [\#275](https://github.com/kubernetes/kompose/issues/275) - specifying service type right now is very docker-compose specific [\#273](https://github.com/kubernetes/kompose/issues/273) - Tiny issue on kompose up --emptyvols displaying [\#268](https://github.com/kubernetes/kompose/issues/268) -- Update README [\#265](https://github.com/kubernetes/kompose/issues/265) +- Update README [\#265](https://github.com/kubernetes/kompose/issues/265) - Change strategy for Deployments/DeployementConfigs [\#264](https://github.com/kubernetes/kompose/issues/264) - Issues regarding CLI. Perhaps switching to Cobra? [\#253](https://github.com/kubernetes/kompose/issues/253) - Track release goals with GitHub milestones [\#250](https://github.com/kubernetes/kompose/issues/250) @@ -1366,10 +1366,10 @@ - Add tests converting dab files [\#167](https://github.com/kubernetes/kompose/issues/167) - integration with minikube/minishift [\#156](https://github.com/kubernetes/kompose/issues/156) - compose2kube [\#151](https://github.com/kubernetes/kompose/issues/151) -- Creating Routes for Services [\#140](https://github.com/kubernetes/kompose/issues/140) +- Creating Routes for Services [\#140](https://github.com/kubernetes/kompose/issues/140) - Support BuildConfigs for openshift provider [\#96](https://github.com/kubernetes/kompose/issues/96) - Image name not given still kompose does not errors out [\#92](https://github.com/kubernetes/kompose/issues/92) -- Validate input args [\#87](https://github.com/kubernetes/kompose/issues/87) +- Validate input args [\#87](https://github.com/kubernetes/kompose/issues/87) - specify Deployment policy [\#17](https://github.com/kubernetes/kompose/issues/17) **Merged pull requests:** @@ -1392,7 +1392,7 @@ - Flag validation called on up and down [\#347](https://github.com/kubernetes/kompose/pull/347) ([surajssd](https://github.com/surajssd)) - updated dev docs with latest instructions [\#341](https://github.com/kubernetes/kompose/pull/341) ([surajssd](https://github.com/surajssd)) - update vendored dependencies [\#340](https://github.com/kubernetes/kompose/pull/340) ([surajssd](https://github.com/surajssd)) -- make YAML the default kompose conversion [\#339](https://github.com/kubernetes/kompose/pull/339) ([procrypt](https://github.com/procrypt)) +- make YAML the default kompose conversion [\#339](https://github.com/kubernetes/kompose/pull/339) ([procrypt](https://github.com/procrypt)) - \#231 Invoking kompose --bundle X.dab convert --stdout will produce tw… [\#338](https://github.com/kubernetes/kompose/pull/338) ([cab105](https://github.com/cab105)) - implement storing to directory or file, add functional tests [\#337](https://github.com/kubernetes/kompose/pull/337) ([concaf](https://github.com/concaf)) - support for raw pod output without controller [\#334](https://github.com/kubernetes/kompose/pull/334) ([surajssd](https://github.com/surajssd)) @@ -1427,7 +1427,7 @@ - Update main.go path [\#266](https://github.com/kubernetes/kompose/pull/266) ([procrypt](https://github.com/procrypt)) - Fix license headers, This closes \#223 [\#262](https://github.com/kubernetes/kompose/pull/262) ([sebgoa](https://github.com/sebgoa)) - Modify command in initializing unit tests [\#261](https://github.com/kubernetes/kompose/pull/261) ([cdrage](https://github.com/cdrage)) -- Add `go vet`, and `gofmt` tests. [\#259](https://github.com/kubernetes/kompose/pull/259) ([kadel](https://github.com/kadel)) +- Add `go vet`, and `gofmt` tests. [\#259](https://github.com/kubernetes/kompose/pull/259) ([kadel](https://github.com/kadel)) - CreatePVC: correct setting of read/only access [\#249](https://github.com/kubernetes/kompose/pull/249) ([dustymabe](https://github.com/dustymabe)) - Tests for CreateService and annotations [\#246](https://github.com/kubernetes/kompose/pull/246) ([cdrage](https://github.com/cdrage)) - Add support for user directive [\#245](https://github.com/kubernetes/kompose/pull/245) ([kadel](https://github.com/kadel)) @@ -1459,7 +1459,7 @@ - time-out errors while deleting deployments on openshift [\#165](https://github.com/kubernetes/kompose/issues/165) - RFE: choosing Service type [\#154](https://github.com/kubernetes/kompose/issues/154) - Ignoring network definitions [\#149](https://github.com/kubernetes/kompose/issues/149) -- Add warnings/error for image not specified [\#80](https://github.com/kubernetes/kompose/issues/80) +- Add warnings/error for image not specified [\#80](https://github.com/kubernetes/kompose/issues/80) - \[Discuss\] Find a good way to vendoring dependencies [\#43](https://github.com/kubernetes/kompose/issues/43) - new behavior of `kompose up` [\#40](https://github.com/kubernetes/kompose/issues/40) @@ -1502,13 +1502,13 @@ - come up with a release schedule [\#187](https://github.com/kubernetes/kompose/issues/187) - go 1.5 not building [\#181](https://github.com/kubernetes/kompose/issues/181) - `--provider` flag for kompose [\#179](https://github.com/kubernetes/kompose/issues/179) -- kompose --version - print out dev tag [\#170](https://github.com/kubernetes/kompose/issues/170) +- kompose --version - print out dev tag [\#170](https://github.com/kubernetes/kompose/issues/170) - suggestion: let `-` denote stdout for -o option [\#169](https://github.com/kubernetes/kompose/issues/169) - kompose up always deploys to default namespace [\#162](https://github.com/kubernetes/kompose/issues/162) - Proposal: make --dab/--bundle global flag [\#161](https://github.com/kubernetes/kompose/issues/161) - Support for "9995:9995/tcp" [\#158](https://github.com/kubernetes/kompose/issues/158) - --file for all kinds of input [\#153](https://github.com/kubernetes/kompose/issues/153) -- `kompose up` for OpenShift [\#152](https://github.com/kubernetes/kompose/issues/152) +- `kompose up` for OpenShift [\#152](https://github.com/kubernetes/kompose/issues/152) - Persistent Volumes [\#150](https://github.com/kubernetes/kompose/issues/150) - Generate ImageStream for every image in DeploymentConfig [\#145](https://github.com/kubernetes/kompose/issues/145) - godep save ./... : cannot find package "k8s.io/kubernetes/pkg/apis/authentication.k8s.io" [\#117](https://github.com/kubernetes/kompose/issues/117) @@ -1539,19 +1539,19 @@ - \[PROPOSAL\] Use -f as a global flag [\#138](https://github.com/kubernetes/kompose/issues/138) - Should we use libcompose project.Context{} instead of docker.Context{}? [\#134](https://github.com/kubernetes/kompose/issues/134) -- services should be first in List [\#130](https://github.com/kubernetes/kompose/issues/130) +- services should be first in List [\#130](https://github.com/kubernetes/kompose/issues/130) - cmd tests are not working properly [\#125](https://github.com/kubernetes/kompose/issues/125) - OpenShift conversoin - invalid DeploymentConfig [\#124](https://github.com/kubernetes/kompose/issues/124) - Wrong output when port is missing [\#121](https://github.com/kubernetes/kompose/issues/121) - Create a pod of containers sharing volume [\#116](https://github.com/kubernetes/kompose/issues/116) - kompose convert panic on v1 compose file [\#102](https://github.com/kubernetes/kompose/issues/102) -- Release: kompose binary should be statically linked [\#98](https://github.com/kubernetes/kompose/issues/98) +- Release: kompose binary should be statically linked [\#98](https://github.com/kubernetes/kompose/issues/98) - Update libcompose to v0.3.0 [\#95](https://github.com/kubernetes/kompose/issues/95) - Wrong warning about networks [\#88](https://github.com/kubernetes/kompose/issues/88) - Problems of converting volumes [\#75](https://github.com/kubernetes/kompose/issues/75) - `--stdout` output as `List` kind [\#73](https://github.com/kubernetes/kompose/issues/73) -- Print warning for unsupported fields in docker-compose format [\#71](https://github.com/kubernetes/kompose/issues/71) -- Bug: incorrect version [\#64](https://github.com/kubernetes/kompose/issues/64) +- Print warning for unsupported fields in docker-compose format [\#71](https://github.com/kubernetes/kompose/issues/71) +- Bug: incorrect version [\#64](https://github.com/kubernetes/kompose/issues/64) - panic: runtime error: invalid memory address or nil pointer dereference [\#59](https://github.com/kubernetes/kompose/issues/59) - Breaking code in app.go to multiple packags [\#55](https://github.com/kubernetes/kompose/issues/55) - Write an architecture document for kompose [\#45](https://github.com/kubernetes/kompose/issues/45) @@ -1601,8 +1601,8 @@ **Closed issues:** -- The example .dsb file doesn't work [\#85](https://github.com/kubernetes/kompose/issues/85) -- docker-compose labels should be converted to k8s annotations instead of labels [\#81](https://github.com/kubernetes/kompose/issues/81) +- The example .dsb file doesn't work [\#85](https://github.com/kubernetes/kompose/issues/85) +- docker-compose labels should be converted to k8s annotations instead of labels [\#81](https://github.com/kubernetes/kompose/issues/81) - Kompose help needs improvment [\#76](https://github.com/kubernetes/kompose/issues/76) - Should we support converting to Replica Sets? [\#63](https://github.com/kubernetes/kompose/issues/63) - `targetPort` is 0 in a converted service definition [\#60](https://github.com/kubernetes/kompose/issues/60) @@ -1612,11 +1612,11 @@ - update README for bundles, compose v2 [\#54](https://github.com/kubernetes/kompose/issues/54) - Consider changing `--from-bundles` \(bool\) to `--bundle-file` \(string\) [\#53](https://github.com/kubernetes/kompose/issues/53) - Consider changing `--rc` flag to bool and adding `--replicas` [\#52](https://github.com/kubernetes/kompose/issues/52) -- Unable to go build [\#49](https://github.com/kubernetes/kompose/issues/49) +- Unable to go build [\#49](https://github.com/kubernetes/kompose/issues/49) - convert file fail [\#47](https://github.com/kubernetes/kompose/issues/47) - \[Discuss\] Optimize convert function [\#44](https://github.com/kubernetes/kompose/issues/44) - Default objects of `kompose convert` [\#38](https://github.com/kubernetes/kompose/issues/38) -- Idea: kompose up, ps, delete, scale redirect to kubectl [\#27](https://github.com/kubernetes/kompose/issues/27) +- Idea: kompose up, ps, delete, scale redirect to kubectl [\#27](https://github.com/kubernetes/kompose/issues/27) - Print out warning for undefined fields [\#3](https://github.com/kubernetes/kompose/issues/3) **Merged pull requests:** @@ -1644,8 +1644,8 @@ - Default controller object is always generated. [\#33](https://github.com/kubernetes/kompose/issues/33) - Generating both ReplicationControllers and Deployments [\#31](https://github.com/kubernetes/kompose/issues/31) - Generating both ReplicationControllers and Deployments [\#30](https://github.com/kubernetes/kompose/issues/30) -- update OpenShift dependency [\#29](https://github.com/kubernetes/kompose/issues/29) -- Bug: chart only expect .json files [\#25](https://github.com/kubernetes/kompose/issues/25) +- update OpenShift dependency [\#29](https://github.com/kubernetes/kompose/issues/29) +- Bug: chart only expect .json files [\#25](https://github.com/kubernetes/kompose/issues/25) - Services only get created when there is a links key present [\#23](https://github.com/kubernetes/kompose/issues/23) - Services should be created first [\#21](https://github.com/kubernetes/kompose/issues/21) - Sometimes redundant services are printed/converted in `kompose convert` [\#20](https://github.com/kubernetes/kompose/issues/20) @@ -1683,6 +1683,4 @@ [Full Changelog](https://github.com/kubernetes/kompose/compare/8cfb216d635a534c18ab4571ac6862cd44e6bfbf...v0.0.1-alpha) - - -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* +\* _This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f9c7cb3544..90dff5b2f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,8 +8,8 @@ We'd love to accept your patches! Before we can take them, we have to jump a cou Please fill out either the individual or corporate Contributor License Agreement (CLA). - * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an individual CLA. - * If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA. +- If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an individual CLA. +- If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA. Contact one of the [OWNERS](OWNERS) on Slack to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. diff --git a/README.md b/README.md index e48cd8b070..d0ebbb1707 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ Convert [`docker-compose.yaml`](https://raw.githubusercontent.com/kubernetes/kom ```sh $ kompose convert -f docker-compose.yaml -INFO Kubernetes file "frontend-service.yaml" created -INFO Kubernetes file "redis-master-service.yaml" created -INFO Kubernetes file "redis-slave-service.yaml" created -INFO Kubernetes file "frontend-deployment.yaml" created -INFO Kubernetes file "redis-master-deployment.yaml" created -INFO Kubernetes file "redis-slave-deployment.yaml" created +INFO Kubernetes file "frontend-service.yaml" created +INFO Kubernetes file "redis-master-service.yaml" created +INFO Kubernetes file "redis-slave-service.yaml" created +INFO Kubernetes file "frontend-deployment.yaml" created +INFO Kubernetes file "redis-master-deployment.yaml" created +INFO Kubernetes file "redis-slave-deployment.yaml" created ``` Other examples are provided in the _examples_ [directory](./examples). @@ -29,22 +29,23 @@ We have multiple ways to install Kompose. Our preferred method is downloading th Our entire list of installation methods are located in our [installation.md](/docs/installation.md) document. Installation methods: - - [Binary (Preferred method)](/docs/installation.md#github-release) - - [Go](/docs/installation.md#go) - - [CentOS](/docs/installation.md#centos) - - [Fedora](/docs/installation.md#fedora) - - [openSUSE/SLE](/docs/installation.md#opensusesle) - - [Ubuntu/Debian](/docs/installation.md#ubuntudebian) - - [NixOS](/docs/installation.md#nixos) - - [macOS (Homebrew and MacPorts)](/docs/installation.md#macos) - - [Windows](/docs/installation.md#windows) - - [Docker](/docs/installation.md#docker) + +- [Binary (Preferred method)](/docs/installation.md#github-release) +- [Go](/docs/installation.md#go) +- [CentOS](/docs/installation.md#centos) +- [Fedora](/docs/installation.md#fedora) +- [openSUSE/SLE](/docs/installation.md#opensusesle) +- [Ubuntu/Debian](/docs/installation.md#ubuntudebian) +- [NixOS](/docs/installation.md#nixos) +- [macOS (Homebrew and MacPorts)](/docs/installation.md#macos) +- [Windows](/docs/installation.md#windows) +- [Docker](/docs/installation.md#docker) #### Binary installation Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases). -__Linux and macOS:__ +**Linux and macOS:** ```sh # Linux @@ -57,7 +58,7 @@ chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose ``` -__Windows:__ +**Windows:** Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.28.0/kompose-windows-amd64.exe) and add the binary to your PATH. @@ -79,29 +80,41 @@ kompose completion fish | source ## Development and building of Kompose ### Building with `go` -__Requisites:__ + +**Requisites:** + 1. [make](https://www.gnu.org/software/make/) 2. [Golang](https://golang.org/) v1.6 or later 3. Set `GOPATH` correctly or click [SettingGOPATH](https://github.com/golang/go/wiki/SettingGOPATH) for details -__Steps:__ +**Steps:** + 1. Clone repository + ```console $ git clone https://github.com/kubernetes/kompose.git $GOPATH/src/github.com/kubernetes/kompose ``` + 2. Change directory to the cloned repo. + ```console cd $GOPATH/src/github.com/kubernetes/kompose ``` + 3. Build with `make` + ```console $ make bin ``` + 4. Or build with `go` + ```console $ go build -o kompose main.go ``` + 5. Test your changes + ```console $ make test ``` @@ -121,12 +134,11 @@ Here is a list of all available docs: ## Community, Discussion, Contribution, and Support -__Issues:__ If you find any issues, please [file it](https://github.com/kubernetes/kompose/issues). - -__Kubernetes Community:__ As part of the Kubernetes ecosystem, we follow the Kubernetes community principles. More information can be found on the [community page](http://kubernetes.io/community/). +**Issues:** If you find any issues, please [file it](https://github.com/kubernetes/kompose/issues). -__Chat (Slack):__ We're fairly active on [Slack](http://slack.kubernetes.io#kompose) and you can find us in the #kompose channel. +**Kubernetes Community:** As part of the Kubernetes ecosystem, we follow the Kubernetes community principles. More information can be found on the [community page](http://kubernetes.io/community/). +**Chat (Slack):** We're fairly active on [Slack](http://slack.kubernetes.io#kompose) and you can find us in the #kompose channel. ### Code of Conduct diff --git a/RELEASE.md b/RELEASE.md index 63d7904a7c..ab20231d4c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,4 +5,4 @@ The process is as follows: 1. A PR proposing a new release with a changelog since the last release 1. At least 2 or more [OWNERS](OWNERS) must LGTM this release 1. The release PR is closed -1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` \ No newline at end of file +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` diff --git a/build/README.md b/build/README.md index 9917d4048e..6a0bccba2d 100644 --- a/build/README.md +++ b/build/README.md @@ -2,18 +2,20 @@ There are instructions on how to build the RPM. -# 1. Gofed +# 1. Gofed Grab gofed from https://github.com/gofed/gofed Choose which version of the repo you want to build. For kompose it was 0.3.0 and the commit was 135165b39c55d29a5426479ded81eddd56bfbaf4 Run the following to generate spec file: + ```sh gofed repo2spec --detect github.com/kubernetes/kompose --commit 135165b39c55d29a5426479ded81eddd56bfbaf4 --with-extra --with-build -f ``` The spec file is now located at: + ```sh $HOME/gofed/golang-github-kubernetes-incubator-kompose/golang-github-kubernetes-incubator-kompose.spec ``` @@ -25,13 +27,13 @@ Now we need to go through and fix some things. Generate bundled dependencies by using parsedeps.go Go to the kompose source folder and then run: + ```sh go run parsedeps.go ``` In the future this will possibly done by `gofed`, see: https://github.com/gofed/gofed/issues/42 - # 3. Building a source RPM locally on CentOS First, follow instructions to do local setup https://wiki.centos.org/HowTos/SetupRpmBuildEnvironment @@ -45,6 +47,7 @@ Copy the kompose code directory with name `kompose-135165b39c55d29a5426479ded81e Tar the `kompose-135165b39c55d29a5426479ded81eddd56bfbaf4` code directory as `kompose-135165b.tar.gz` and copy it to `$HOME/rpmbuild/SOURCES/` Run following command: + ```sh rpmbuild -ba kompose.spec ``` @@ -54,6 +57,7 @@ Find the srpm in `$HOME/rpmbuild/SRPMS` Find the RPM in `$HOME/rpmbuild/RPM/arch/` Check that the dependencies are proper: + ```sh rpm -qpR RPMS/x86_64/kompose-0.3.0-0.1.git135165b.el7.centos.x86_64.rpm ``` @@ -63,12 +67,14 @@ rpm -qpR RPMS/x86_64/kompose-0.3.0-0.1.git135165b.el7.centos.x86_64.rpm First, setup your environment in order to run Koji: https://fedoraproject.org/wiki/Using_the_Koji_build_system Example setup: + ```sh fedora-packager-setup kinit @FEDORAPROJECT.ORG ``` To build it on koji run: + ``` koji build --scratch rawhide kompose-0.3.0-0.1.git135165b.el7.centos.src.rpm ``` diff --git a/docs/Gemfile b/docs/Gemfile index e16625af19..0a16d489af 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -29,3 +29,4 @@ end gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? gem "jekyll-redirect-from" + diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 3b5ed4e502..a5bbc4eed0 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,10 +1,10 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) @@ -12,7 +12,7 @@ GEM ffi (1.15.5) forwardable-extended (2.6.0) http_parser.rb (0.8.0) - i18n (1.8.11) + i18n (1.12.0) concurrent-ruby (~> 1.0) jekyll (4.0.1) addressable (~> 2.4) @@ -29,22 +29,22 @@ GEM rouge (~> 3.0) safe_yaml (~> 1.0) terminal-table (~> 1.8) - jekyll-feed (0.16.0) + jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) - jekyll-sass-converter (2.1.0) + jekyll-sass-converter (2.2.0) sassc (> 2.0.1, < 3.0) - jekyll-seo-tag (2.7.1) + jekyll-seo-tag (2.8.0) jekyll (>= 3.8, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - kramdown (2.3.1) + kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - liquid (4.0.3) - listen (3.7.0) + liquid (4.0.4) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) @@ -54,12 +54,12 @@ GEM jekyll-seo-tag (~> 2.1) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.6) - rb-fsevent (0.11.0) + public_suffix (5.0.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.5) - rouge (3.27.0) + rouge (3.30.0) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) @@ -68,7 +68,7 @@ GEM thread_safe (0.3.6) tzinfo (1.2.10) thread_safe (~> 0.1) - tzinfo-data (1.2021.5) + tzinfo-data (1.2022.7) tzinfo (>= 1.0.0) unicode-display_width (1.8.0) wdm (0.1.1) @@ -86,4 +86,4 @@ DEPENDENCIES wdm (~> 0.1.1) BUNDLED WITH - 2.1.4 + 2.4.4 diff --git a/docs/architecture.md b/docs/architecture.md index d54e35d8bc..8f9adf726e 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -2,36 +2,35 @@ layout: default permalink: /architecture/ title: Architecture -redirect_from: +redirect_from: - /docs/architecture.md/ - /docs/architecture/ --- # Architecture and Internal Design -* TOC -{:toc} +- TOC -`kompose` has 3 stages: Loader, Transformer and Outputter. Each Stage should have well defined interface so it is easy to write new Loader, Transformer or Outputters and plug it in. Currently only Loader and Transformer interfaces are defined. +`kompose` has 3 stages: _Loader_, _Transformer_ and _Outputter_. Each stage should have a well-defined interface, so it is easy to write a new Loader, Transformer, or Outputters and plug it in. Currently, only Loader and Transformer interfaces are defined. ![Design Diagram](https://github.com/kubernetes/kompose/blob/master/docs/images/design_diagram.png) ## Loader -Loader reads input file (now `kompose` supports [Docker Compose](https://docs.docker.com/compose) v1, v2 and converts it to KomposeObject. +The Loader reads the input file now `kompose` supports [Docker Compose](https://docs.docker.com/compose) v1, v2 and converts it to KomposeObject. Loader is represented by a Loader interface: - + ```go type Loader interface { LoadFile(file string) kobject.KomposeObject } ``` -Every loader “implementation” should be placed into `kompose/pkg/loader` (like compose). More input formats will be supported in future. You can take a look for more details at: +Every loader “implementation” should be placed into `kompose/pkg/loader` (like compose). More input formats will be supported in the future. You can take a look for more details at: -* [kompose/pkg/loader](https://github.com/kubernetes/kompose/tree/master/pkg/loader) -* [kompose/pkg/loader/compose](https://github.com/kubernetes/kompose/tree/master/pkg/loader/compose) +- [kompose/pkg/loader](https://github.com/kubernetes/kompose/tree/master/pkg/loader) +- [kompose/pkg/loader/compose](https://github.com/kubernetes/kompose/tree/master/pkg/loader/compose) ## KomposeObject @@ -40,38 +39,38 @@ Every loader “implementation” should be placed into `kompose/pkg/loader` (li ```go // KomposeObject holds the generic struct of Kompose transformation type KomposeObject struct { - ServiceConfigs map[string]ServiceConfig + ServiceConfigs map[string]ServiceConfig } // ServiceConfig holds the basic struct of a container type ServiceConfig struct { - ContainerName string - Image string - Environment []EnvVar - Port []Ports - Command []string - WorkingDir string - Args []string - Volumes []string - Network []string - Labels map[string]string - Annotations map[string]string - CPUSet string - CPUShares int64 - CPUQuota int64 - CapAdd []string - CapDrop []string - Entrypoint []string - Expose []string - Privileged bool - Restart string - User string + ContainerName string + Image string + Environment []EnvVar + Port []Ports + Command []string + WorkingDir string + Args []string + Volumes []string + Network []string + Labels map[string]string + Annotations map[string]string + CPUSet string + CPUShares int64 + CPUQuota int64 + CapAdd []string + CapDrop []string + Entrypoint []string + Expose []string + Privileged bool + Restart string + User string } ``` ## Transformer -Transformer takes KomposeObject and converts it to target/output format (at this moment, there are sets of kubernetes/openshift objects). Similar to `Loader`, Transformer is represented by a Transformer interface: +The Transformer takes KomposeObject and converts it to target/output format (currently, there are sets of Kubernetes/OpenShift objects). Similar to the `Loader`, Transformer is represented by a Transformer interface: ```go type Transformer interface { @@ -79,12 +78,12 @@ type Transformer interface { } ``` -If you wish to add more providers which contain different kind of objects, transformer would be the place to look into. At this moment Kompose supports Kubernetes (by default) and Openshift providers. More details at: +If you wish to add more providers containing different kinds of objects, the Transformer would be the place to look into. Currently, Kompose supports Kubernetes (by default) and OpenShift providers. More details at: -* [kompose/pkg/transformer](https://github.com/kubernetes/kompose/tree/master/pkg/transformer) -* [kompose/pkg/transformer/kubernetes](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/kubernetes) -* [kompose/pkg/transformer/openshift](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/openshift) +- [kompose/pkg/transformer](https://github.com/kubernetes/kompose/tree/master/pkg/transformer) +- [kompose/pkg/transformer/Kubernetes](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/kubernetes) +- [kompose/pkg/transformer/openshift](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/openshift) ## Outputter -Outputter takes Transformer result and executes given action. For example action can be displaying result to stdout or directly deploying artifacts to Kubernetes/OpenShift. +The Outputter takes the Transformer result and executes the given action. For example, action can display results to stdout or directly deploy artifacts to Kubernetes/OpenShift. diff --git a/docs/conversion.md b/docs/conversion.md index 86e79b4dbf..31b22764cd 100644 --- a/docs/conversion.md +++ b/docs/conversion.md @@ -9,8 +9,8 @@ redirect_from: # Conversion Matrix -* TOC -{:toc} +- TOC + {:toc} This document outlines all possible conversion details regarding `docker-compose.yaml` values to Kubernetes / OpenShift artifacts. @@ -21,23 +21,23 @@ We're doing our best to keep it up to date as soon as possible in our releases t ## Conversion Table -__Glossary:__ +**Glossary:** -- __✓:__ Converts -- __-:__ Not in this Docker Compose Version -- __n:__ Not yet implemented -- __x:__ Not applicable / no 1-1 conversion +- **✓:** Converts +- **-:** Not in this Docker Compose Version +- **n:** Not yet implemented +- **x:** Not applicable / no 1-1 conversion | Keys | V1 | V2 | V3 | Kubernetes / OpenShift | Notes | -|------------------------|----|----|----|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| +| ---------------------- | -- | -- | -- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | build | ✓ | ✓ | ✓ | | Builds/Pushes to Docker repository. See [user guide on build and push image](https://kompose.io/user-guide/#build-and-push-image) | | build: context | ✓ | ✓ | ✓ | | | | build: dockerfile | ✓ | ✓ | ✓ | | | | build: args | n | n | n | | | | build: cache_from | - | - | n | | | -| cap_add | ✓ | ✓ | ✓ | Container.SecurityContext.Capabilities.Add | | -| cap_drop | ✓ | ✓ | ✓ | Container.SecurityContext.Capabilities.Drop | | -| command | ✓ | ✓ | ✓ | Container.Args | | +| cap_add | ✓ | ✓ | ✓ | Container.SecurityContext.Capabilities.Add | | +| cap_drop | ✓ | ✓ | ✓ | Container.SecurityContext.Capabilities.Drop | | +| command | ✓ | ✓ | ✓ | Container.Args | | | configs | n | n | ✓ | | | | configs: short-syntax | n | n | ✓ | | Only create configMap | | configs: long-syntax | n | n | ✓ | | If target path is /, ignore this and only create configMap | @@ -47,7 +47,7 @@ __Glossary:__ | deploy | - | - | ✓ | | | | deploy: mode | - | - | ✓ | | | | deploy: replicas | - | - | ✓ | Deployment.Spec.Replicas / DeploymentConfig.Spec.Replicas | | -| deploy: placement | - | - | ✓ | Affinity | | +| deploy: placement | - | - | ✓ | Affinity | | | deploy: update_config | - | - | ✓ | Workload.Spec.Strategy | Deployment / DeploymentConfig | | deploy: resources | - | - | ✓ | Containers.Resources.Limits.Memory / Containers.Resources.Limits.CPU | Support for memory as well as cpu | | deploy: restart_policy | - | - | ✓ | Pod generation | This generated a Pod, see the [user guide on restart](http://kompose.io/user-guide/#restart) | @@ -56,11 +56,11 @@ __Glossary:__ | depends_on | x | x | x | | | | dns | x | x | x | | Not used within Kubernetes. Kubernetes uses a managed DNS server | | dns_search | x | x | x | | See `dns` key | -| domainname | ✓ | ✓ | ✓ | SubDomain | | -| tmpfs | ✓ | ✓ | ✓ | Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container | -| entrypoint | ✓ | ✓ | ✓ | Container.Command | | +| domainname | ✓ | ✓ | ✓ | SubDomain | | +| tmpfs | ✓ | ✓ | ✓ | Containers.Volumes.EmptyDir | Creates emptyDirvolume with medium set to Memory & mounts given directory inside container | +| entrypoint | ✓ | ✓ | ✓ | Container.Command | | | env_file | n | n | ✓ | | | -| environment | ✓ | ✓ | ✓ | Container.Env | | +| environment | ✓ | ✓ | ✓ | Container.Env | | | expose | ✓ | ✓ | ✓ | Service.Spec.Ports | | | endpoint_mode | n | n | ✓ | | If endpoint_mode=vip, the created Service will be forced to set to NodePort type | | extends | ✓ | ✓ | ✓ | | Extends by utilizing the same image supplied | @@ -68,7 +68,7 @@ __Glossary:__ | extra_hosts | n | n | n | | | | group_add | ✓ | ✓ | ✓ | | | | healthcheck | - | n | ✓ | | | -| hostname | ✓ | ✓ | ✓ | HostName | | +| hostname | ✓ | ✓ | ✓ | HostName | | | image | ✓ | ✓ | ✓ | Deployment.Spec.Containers.Image | | | isolation | x | x | x | | Not applicable as this applies to Windows with HyperV support | | labels | ✓ | ✓ | ✓ | Metadata.Annotations | | @@ -78,7 +78,7 @@ __Glossary:__ | networks | ✓ | ✓ | ✓ | | See `networks` key | | networks: aliases | x | x | x | | See `networks` key | | networks: addresses | x | x | x | | See `networks` key | -| pid | ✓ | ✓ | ✓ | HostPID | | +| pid | ✓ | ✓ | ✓ | HostPID | | | ports | ✓ | ✓ | ✓ | Service.Spec.Ports | | | ports: short-syntax | ✓ | ✓ | ✓ | Service.Spec.Ports | | | ports: long-syntax | - | - | ✓ | Service.Spec.Ports | | @@ -86,7 +86,7 @@ __Glossary:__ | secrets: short-syntax | - | - | ✓ | Secret | External Secret is not Supported | | secrets: long-syntax | - | - | ✓ | Secret | External Secret is not Supported | | security_opt | x | x | x | | Kubernetes uses its own container naming scheme | -| stop_grace_period | ✓ | ✓ | ✓ | TerminationGracePeriodSeconds | | +| stop_grace_period | ✓ | ✓ | ✓ | TerminationGracePeriodSeconds | | | stop_signal | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/30051 | | sysctls | n | n | n | | | | ulimits | x | x | x | | Not supported within Kubernetes. See issue https://github.com/kubernetes/kubernetes/issues/3595 | @@ -96,13 +96,13 @@ __Glossary:__ | volumes: long-syntax | - | - | ✓ | PersistentVolumeClaim | Creates a PersistentVolumeClaim. Can only be created if there is already a PersistentVolume within the cluster | | restart | ✓ | ✓ | ✓ | | | | | | | | | | -| __Volume__ | x | x | x | | | +| **Volume** | x | x | x | | | | driver | x | x | x | | | | driver_opts | x | x | x | | | | external | x | x | x | | | | labels | x | x | x | | | | | | | | | | -| __Network__ | x | x | x | | | +| **Network** | x | x | x | | | | driver | x | x | x | | | | driver_opts | x | x | x | | | | enable_ipv6 | x | x | x | | | diff --git a/docs/development.md b/docs/development.md index 073e0df4d7..821858f187 100644 --- a/docs/development.md +++ b/docs/development.md @@ -14,6 +14,7 @@ redirect_from: Read about building kompose [here](https://github.com/kubernetes/kompose#building). ## Workflow + ### Fork the main repository 1. Go to https://github.com/kubernetes/kompose @@ -21,7 +22,7 @@ Read about building kompose [here](https://github.com/kubernetes/kompose#buildin ### Clone your fork -The commands below require that you have $GOPATH. We highly recommended you put Kompose' code into your $GOPATH. +The commands below require that you have `$GOPATH`. We highly recommended you put the Kompose code into your `$GOPATH`. ```console git clone https://github.com/$YOUR_GITHUB_USERNAME/kompose.git $GOPATH/src/github.com/kubernetes/kompose @@ -65,12 +66,13 @@ git push -f origin myfeature ## Go Modules and dependency management Kompose uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies. -If you want to make changes to dependencies please make sure that `go.mod` and `go.sum` are updated properly. +If you want to introduce changes to dependencies, please ensure that `go.mod` and `go.sum` are updated properly. ##### Updating Kubernetes and OpenShift + Kubernetes version depends on what version is OpenShift using. OpenShift is using forked Kubernetes to carry some patches. -Currently it is not possible to use different Kubernetes version from version that OpenShift uses. +Currently, it is not possible to use a different Kubernetes version from the version that OpenShift uses. (for more see comments in `go.mod`) ### Adding CLI tests @@ -83,6 +85,6 @@ To generate CLI tests, please run `make gen-cmd`. For Kompose, we use numerous CI's: - - [TravisCI](https://travis-ci.org/kubernetes/kompose): Unit and CLI tests - - [SemaphoreCI](https://semaphoreci.com/cdrage/kompose-2): Integration / cluster tests - - [Fabric8CI](http://jenkins.cd.k8s.fabric8.io/): Secondary integration tests / future cluster tests +- [TravisCI](https://travis-ci.org/kubernetes/kompose): Unit and CLI tests +- [SemaphoreCI](https://semaphoreci.com/cdrage/kompose-2): Integration / cluster tests +- [Fabric8CI](http://jenkins.cd.k8s.fabric8.io/): Secondary integration tests / future cluster tests diff --git a/docs/getting-started.md b/docs/getting-started.md index f18eb94a68..5831ed555c 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -2,15 +2,15 @@ layout: default permalink: /getting-started/ title: Getting Started -redirect_from: +redirect_from: - /docs/getting-started.md/ - /docs/getting-started/ --- # Getting Started -* TOC -{:toc} +- TOC + {:toc} This is how you'll get started with Kompose! @@ -23,10 +23,11 @@ For beginners and the most compatibility, follow the _Minikube and Kompose_ guid In this guide, we'll deploy a sample `docker-compose.yaml` file to a Kubernetes cluster. Requirements: - - [minikube](https://github.com/kubernetes/minikube) - - [kompose](https://github.com/kubernetes/kompose) -__Start `minikube`:__ +- [minikube](https://github.com/kubernetes/minikube) +- [kompose](https://github.com/kubernetes/kompose) + +**Start `minikube`:** If you don't already have a Kubernetes cluster running, [minikube](https://github.com/kubernetes/minikube) is the best way to get started. @@ -43,30 +44,29 @@ Starting cluster components... Kubectl is now configured to use the cluster ``` -__Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:__ +**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** ```sh wget https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml ``` -__Convert your Docker Compose file to Kubernetes:__ +**Convert your Docker Compose file to Kubernetes:** Run `kompose convert` in the same directory as your `docker-compose.yaml` file. ```sh -$ kompose convert -INFO Kubernetes file "frontend-service.yaml" created -INFO Kubernetes file "redis-master-service.yaml" created -INFO Kubernetes file "redis-slave-service.yaml" created -INFO Kubernetes file "frontend-deployment.yaml" created -INFO Kubernetes file "redis-master-deployment.yaml" created -INFO Kubernetes file "redis-slave-deployment.yaml" created +$ kompose convert +INFO Kubernetes file "frontend-service.yaml" created +INFO Kubernetes file "redis-master-service.yaml" created +INFO Kubernetes file "redis-slave-service.yaml" created +INFO Kubernetes file "frontend-deployment.yaml" created +INFO Kubernetes file "redis-master-deployment.yaml" created +INFO Kubernetes file "redis-slave-deployment.yaml" created ``` -Then you can use `kubectl apply` to create these resources in kubernetes. - +Then you can use `kubectl apply` to create these resources in Kubernetes. -__Access the newly deployed service:__ +**Access the newly deployed service:** Now that your service has been deployed, let's access it. @@ -92,7 +92,6 @@ NodePort: 80 31144/TCP Endpoints: 172.17.0.4:80 Session Affinity: None No events. - ``` Note: If you're using a cloud provider, your IP will be listed next to `LoadBalancer Ingress`. @@ -100,7 +99,7 @@ Note: If you're using a cloud provider, your IP will be listed next to `LoadBala If you have yet to expose your service (for example, within GCE), use the command: ```sh -kubectl expose deployment frontend --type="LoadBalancer" +kubectl expose deployment frontend --type="LoadBalancer" ``` To check functionality, you may also `curl` the URL. @@ -114,15 +113,16 @@ $ curl http://123.45.67.89 In this guide, we'll deploy a sample `docker-compose.yaml` file to an OpenShift cluster. Requirements: - - [minishift](https://github.com/minishift/minishift) - - [kompose](https://github.com/kubernetes/kompose) - - An OpenShift route created -__Note:__ The service will NOT be accessible until you create an OpenShift route with `oc expose`. You must also have a virtualization environment setup. By default, `minishift` uses KVM. +- [minishift](https://github.com/minishift/minishift) +- [kompose](https://github.com/kubernetes/kompose) +- An OpenShift route created + +**Note:** The service will NOT be accessible until you create an OpenShift route with `oc expose`. You must also have a virtualization environment setup. By default, `minishift` uses KVM. -__Start `minishift`:__ +**Start `minishift`:** -[Minishift](https://github.com/minishift/minishift) is a tool that helps run OpenShift locally using a single-node cluster inside of a VM. Similar to [minikube](https://github.com/kubernetes/minikube). +[Minishift](https://github.com/minishift/minishift) is a tool that helps run OpenShift locally using a single-node cluster inside a VM. Similar to [minikube](https://github.com/kubernetes/minikube). ```sh $ minishift start @@ -134,32 +134,32 @@ Starting local OpenShift cluster using 'kvm' hypervisor... ... ``` -__Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:__ +**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** ```sh wget https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml ``` -__Convert your Docker Compose file to OpenShift:__ +**Convert your Docker Compose file to OpenShift:** Run `kompose convert --provider=openshift` in the same directory as your `docker-compose.yaml` file. ```sh $ kompose convert --provider=openshift -INFO OpenShift file "frontend-service.yaml" created -INFO OpenShift file "redis-master-service.yaml" created -INFO OpenShift file "redis-slave-service.yaml" created -INFO OpenShift file "frontend-deploymentconfig.yaml" created -INFO OpenShift file "frontend-imagestream.yaml" created -INFO OpenShift file "redis-master-deploymentconfig.yaml" created -INFO OpenShift file "redis-master-imagestream.yaml" created -INFO OpenShift file "redis-slave-deploymentconfig.yaml" created -INFO OpenShift file "redis-slave-imagestream.yaml" created +INFO OpenShift file "frontend-service.yaml" created +INFO OpenShift file "redis-master-service.yaml" created +INFO OpenShift file "redis-slave-service.yaml" created +INFO OpenShift file "frontend-deploymentconfig.yaml" created +INFO OpenShift file "frontend-imagestream.yaml" created +INFO OpenShift file "redis-master-deploymentconfig.yaml" created +INFO OpenShift file "redis-master-imagestream.yaml" created +INFO OpenShift file "redis-slave-deploymentconfig.yaml" created +INFO OpenShift file "redis-slave-imagestream.yaml" created ``` Then you can use `kubectl apply` to create these resources in OpenShift cluster. -__Access the newly deployed service:__ +**Access the newly deployed service:** After deployment, you must create an OpenShift route in order to access the service. @@ -191,15 +191,16 @@ Opening the OpenShift Web console in the default browser... In this guide, we'll deploy a sample `docker-compose.yaml` file using both RHEL (Red Hat Enterprise Linux) and OpenShift. Requirements: - - Red Hat Enterprise Linux 7.4 - - [Red Hat Development Suite](https://developers.redhat.com/products/devsuite/overview/) - - Which includes: - - [minishift](https://github.com/minishift/minishift) - - [kompose](https://github.com/kubernetes/kompose) -__Note:__ A KVM hypervisor must be setup in order to correctly use `minishift` on RHEL. You can set it up via the [CDK Documentation](https://access.redhat.com/documentation/en-us/red_hat_container_development_kit/3.1/html-single/getting_started_guide/index#setup-virtualization) under "Set up your virtualization environment". +- Red Hat Enterprise Linux 7.4 +- [Red Hat Development Suite](https://developers.redhat.com/products/devsuite/overview/) + - Which includes: + - [minishift](https://github.com/minishift/minishift) + - [kompose](https://github.com/kubernetes/kompose) + +**Note:** A KVM hypervisor must be setup in order to correctly use `minishift` on RHEL. You can set it up via the [CDK Documentation](https://access.redhat.com/documentation/en-us/red_hat_container_development_kit/3.1/html-single/getting_started_guide/index#setup-virtualization) under "Set up your virtualization environment". -__Install Red Hat Development Suite:__ +**Install Red Hat Development Suite:** Before we are able to use both `minishift` and `kompose`, DevSuite must be installed. A more concise [installation document is available](https://developers.redhat.com/products/cdk/hello-world#fndtn-rhel). @@ -230,7 +231,7 @@ Install Red Hat Development Suite and Kompose. $ yum install rh-devsuite kompose -y ``` -__Start `minishift`:__ +**Start `minishift`:** Before we begin, we must do a few preliminary steps setting up `minishift`. @@ -253,32 +254,32 @@ Starting local OpenShift cluster using 'kvm' hypervisor... ... ``` -__Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:__ +**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** ```sh wget https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml ``` -__Convert your Docker Compose file to OpenShift:__ +**Convert your Docker Compose file to OpenShift:** Run `kompose convert --provider=openshift` in the same directory as your `docker-compose.yaml` file. ```sh $ kompose convert --provider=openshift -INFO OpenShift file "frontend-service.yaml" created -INFO OpenShift file "redis-master-service.yaml" created -INFO OpenShift file "redis-slave-service.yaml" created -INFO OpenShift file "frontend-deploymentconfig.yaml" created -INFO OpenShift file "frontend-imagestream.yaml" created -INFO OpenShift file "redis-master-deploymentconfig.yaml" created -INFO OpenShift file "redis-master-imagestream.yaml" created -INFO OpenShift file "redis-slave-deploymentconfig.yaml" created -INFO OpenShift file "redis-slave-imagestream.yaml" created +INFO OpenShift file "frontend-service.yaml" created +INFO OpenShift file "redis-master-service.yaml" created +INFO OpenShift file "redis-slave-service.yaml" created +INFO OpenShift file "frontend-deploymentconfig.yaml" created +INFO OpenShift file "frontend-imagestream.yaml" created +INFO OpenShift file "redis-master-deploymentconfig.yaml" created +INFO OpenShift file "redis-master-imagestream.yaml" created +INFO OpenShift file "redis-slave-deploymentconfig.yaml" created +INFO OpenShift file "redis-slave-imagestream.yaml" created ``` Then you can use `kubectl apply` to create these resources in OpenShift. -__Access the newly deployed service:__ +**Access the newly deployed service:** After deployment, you must create an OpenShift route in order to access the service. diff --git a/docs/index.md b/docs/index.md index 7df7cf6f95..fb3d2673da 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,6 +4,7 @@ layout: index --- + ```sh $ kompose convert -f docker-compose.yaml diff --git a/docs/installation.md b/docs/installation.md index c7284ea17a..1ae236b976 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,15 +2,15 @@ layout: default permalink: /installation/ title: Installation -redirect_from: +redirect_from: - /docs/installation.md/ - /docs/installation/ --- # Installation -* TOC -{:toc} +- TOC + {:toc} We have multiple ways to install Kompose. Our preferred method is downloading the binary from the latest GitHub release. @@ -18,7 +18,7 @@ We have multiple ways to install Kompose. Our preferred method is downloading th Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases). -__Linux and macOS:__ +**Linux and macOS:** ```sh # Linux @@ -31,7 +31,7 @@ chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose ``` -__Windows:__ +**Windows:** Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v1.28.0/kompose-windows-amd64.exe) and add the binary to your PATH. @@ -46,7 +46,7 @@ go install github.com/kubernetes/kompose@latest ## CentOS Kompose is in [EPEL](https://fedoraproject.org/wiki/EPEL) CentOS repository. -If you don't have [EPEL](https://fedoraproject.org/wiki/EPEL) repository already installed and enabled you can do it by running `sudo yum install epel-release` +If you don't have [EPEL](https://fedoraproject.org/wiki/EPEL) repository already installed and enabled you can do it by running `sudo yum install epel-release` If you have [EPEL](https://fedoraproject.org/wiki/EPEL) enabled in your system, you can install Kompose like any other package. @@ -55,6 +55,7 @@ sudo yum -y install kompose ``` ## Fedora + Kompose is in Fedora 24, 25 and 26 repositories. You can install it just like any other package. ```bash @@ -63,7 +64,7 @@ sudo dnf -y install kompose ## Ubuntu/Debian -A deb package is released for compose. Download latest package in the assets in [github releases](https://github.com/kubernetes/kompose/releases). +A deb package is released for compose. Download the latest package in the assets in [GitHub releases](https://github.com/kubernetes/kompose/releases). ```bash wget https://github.com/kubernetes/kompose/releases/download/v1.28.0/kompose_1.28.0_amd64.deb # Replace 1.28.0 with latest tag @@ -71,8 +72,8 @@ sudo apt install ./kompose_1.28.0_amd64.deb ``` ## macOS -On macOS you can install latest release via [Homebrew](https://brew.sh) or [MacPorts](https://www.macports.org/). +On macOS, you can install the latest release via [Homebrew](https://brew.sh) or [MacPorts](https://www.macports.org/). ```bash # Homebrew brew install kompose @@ -82,6 +83,7 @@ port install kompose ``` ## Windows + Kompose can be installed via [Chocolatey](https://chocolatey.org/packages/kubernetes-kompose) ```console @@ -89,6 +91,7 @@ choco install kubernetes-kompose ``` ## openSUSE/SLE + Kompose is available in the official repositories of openSUSE Tumbleweed and in openSUSE Leap starting with 15.2. On SUSE Linux Enterprise Server 15 SP2 - and following - you can install kompose from [PackageHub](https://packagehub.suse.com/). Please refer to the SUSE documentation on how to activate [PackageHub](https://packagehub.suse.com/) on your SUSE Linux Enterprise distribution. ```bash @@ -109,10 +112,9 @@ To run `kompose` without installing it, use [nix-shell](https://nixos.org/manual nix-shell -p kompose --run "kompose convert" ``` - ## Docker -You can build an image from the offical repo for [Docker](https://docs.docker.com/engine/reference/commandline/build/) or [Podman](https://docs.podman.io/en/latest/markdown/podman-build.1.html): +You can build an image from the official repo for [Docker](https://docs.docker.com/engine/reference/commandline/build/) or [Podman](https://docs.podman.io/en/latest/markdown/podman-build.1.html): ```bash docker build -t kompose https://github.com/kubernetes/kompose.git diff --git a/docs/integrations.md b/docs/integrations.md index d1aeb0b05a..da52decf89 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -2,56 +2,56 @@ layout: default permalink: /integrations/ title: Integrations -redirect_from: +redirect_from: - /docs/integrations.md/ - /docs/integrations/ --- # Integrations -* TOC -{:toc} +- TOC + {:toc} There are some projects out there known to use Kompose integrated in some form or another ### Kompose UI by Jad Chamoun (ICANN) and Joe Haddad (Anghami) -__Description:__ "A web interface to convert Docker Compose files to Kubernetes YAML" +**Description:** "A web interface to convert Docker Compose files to Kubernetes YAML" -__Link:__ [https://github.com/JadCham/komposeui](https://github.com/JadCham/komposeui) +**Link:** [https://github.com/JadCham/komposeui](https://github.com/JadCham/komposeui) ### Kompose Docker Container by Cloudfind -__Description:__ "A Docker container for the Kompose translator for docker-compose" +**Description:** "A Docker container for the Kompose translator for docker-compose" -__Link:__ [https://github.com/cloudfind/kompose-docker](https://github.com/cloudfind/kompose-docker) +**Link:** [https://github.com/cloudfind/kompose-docker](https://github.com/cloudfind/kompose-docker) ### KPM by CoreOS -__Description:__ "KPM is a tool to deploy and manage application stacks on Kubernetes" +**Description:** "KPM is a tool to deploy and manage application stacks on Kubernetes" -__Link:__ [https://github.com/coreos/kpm](https://github.com/coreos/kpm) +**Link:** [https://github.com/coreos/kpm](https://github.com/coreos/kpm) ### Docker Image for Adobe Enterprise Manager by Adfinis SyGroup AG -__Description:__ "Docker Image for Adobe Enterprise Manager" +**Description:** "Docker Image for Adobe Enterprise Manager" -__Link:__ [https://github.com/adfinis-sygroup/aem-docker/tree/master](https://github.com/adfinis-sygroup/aem-docker/tree/master) +**Link:** [https://github.com/adfinis-sygroup/aem-docker/tree/master](https://github.com/adfinis-sygroup/aem-docker/tree/master) ### Kompose Ansible Playbook by Chris Houseknecht (Red Hat) -__Description:__ "Download and unarchive the latest kompose release asset for your OS" +**Description:** "Download and unarchive the latest kompose release asset for your OS" -__Link:__ [https://github.com/chouseknecht/kompose-install-role](https://github.com/chouseknecht/kompose-install-role) +**Link:** [https://github.com/chouseknecht/kompose-install-role](https://github.com/chouseknecht/kompose-install-role) ### Fabric8 Maven Plugin by Red Hat -__Description:__ "Maven is one of the widely used build tools for Java applications. The Fabric8 Maven Plugin is a maven extension that simplifies the deployment of Java applications to Kubernetes or OpenShift cluster. -The main task of this plugin is to build Docker images, generate Kubernetes or OpenShift resource descriptors and run/deploy the application on Kubernetes or OpenShift cluster. -Plugin has wide range of configuration options. Docker Compose is one of the option to bring up deployments on Kubernetes or OpenShift cluster. +**Description:** "Maven is one of the widely used build tools for Java applications. The Fabric8 Maven Plugin is a maven extension that simplifies the deployment of Java applications to Kubernetes or OpenShift clusters. +The main task of this plugin is to build Docker images, generate Kubernetes or OpenShift resource descriptors and run/deploy the application on Kubernetes or OpenShift cluster. +The plugin has a wide range of configuration options. Docker Compose is one of the options to bring up deployments on Kubernetes or OpenShift clusters. Technically, Fabric8 Maven Plugin processes the external docker-compose.yml file and generates Kubernetes or OpenShift resources via Kompose." -__Links:__ +**Links:** -* [Quickstart](/docs/maven-example.md) -* [Documentation](https://maven.fabric8.io/#docker-compose) +- [Quickstart](/docs/maven-example.md) +- [Documentation](https://maven.fabric8.io/#docker-compose) diff --git a/docs/maven-example.md b/docs/maven-example.md index a2a8e62077..aa195967cc 100644 --- a/docs/maven-example.md +++ b/docs/maven-example.md @@ -2,45 +2,52 @@ layout: default permalink: /maven-example/ title: Maven Example -redirect_from: +redirect_from: - /docs/maven-example.md/ - /docs/maven-example/ --- # Fabric8 Maven Plugin + Kompose: + Let's deploy a Springboot Java application with Docker Compose file using Fabric8 Maven Plugin to Kubernetes or OpenShift. ##### Requirements -* Linux or MacOS or Windows -* JDK 1.7+ - [JDK Quick Installation Guide](http://openjdk.java.net/install/) -* Maven 3.x+ - [Maven Installation Guide](http://www.baeldung.com/install-maven-on-windows-linux-mac) -* Kompose - [Kompose Installation Guide](/docs/installation.md) -__1. Clone the example project from GitHub__ +- Linux or MacOS or Windows +- JDK 1.7+ - [JDK Quick Installation Guide](http://openjdk.java.net/install/) +- Maven 3.x+ - [Maven Installation Guide](http://www.baeldung.com/install-maven-on-windows-linux-mac) +- Kompose - [Kompose Installation Guide](/docs/installation.md) + +**1. Clone the example project from GitHub** + ```bash $ git clone https://github.com/piyush1594/kompose-maven-example.git ``` Change current directory to `kompose-maven-example` directory. + ```bash $ cd kompose-maven-example ``` -__2. Add Fabric8 Maven Plugin to your project__ +**2. Add Fabric8 Maven Plugin to your project** + ```bash $ mvn io.fabric8:fabric8-maven-plugin:3.5.28:setup ``` Add the Fabric8 Maven Plugin configuration to `pom.xml` of project. `pom.xml` is manifest or deployment descriptor file of a maven project. -__3. Install Kompose through Maven__ +**3. Install Kompose through Maven** + ```bash $ mvn fabric8:install ``` This command installs the `kompose` on the host. -__4. Configure Fabric8 Maven Plugin to use a Docker Compose file__ +**4. Configure Fabric8 Maven Plugin to use a Docker Compose file** + ```bash io.fabric8 @@ -61,19 +68,22 @@ __4. Configure Fabric8 Maven Plugin to use a Docker Compose file__ Add the `` and `` sections to `pom.xml` as shown in above `pom.xml` snippet. Update the `` to provide the relative path of Docker Compose file from `pom.xml` -__5. Deploy application on Kubernetes or OpenShift__ +**5. Deploy application on Kubernetes or OpenShift** + +Make sure that Kubernetes/OpenShift cluster or Minikube/Minishift is running. In case, if anything of this is not running, you can run Minishift to test this application by using the following command. - Make sure that Kubernetes/OpenShift cluster or Minikube/minishift is running. In case, if anything of this is not running, you can run minishift to test this application by using following command. ```bash $ minishift start ``` - Below command deploys this application on Kubernetes or OpenShift. +Below command deploys this application on Kubernetes or OpenShift. + ```bash -$ mvn fabric8:deploy +$ mvn fabric8:deploy ``` Now that your service has been deployed, let's access it by querying `pod`, `service` from Kubernetes or OpenShift. + ```bash $ oc get pods NAME READY STATUS RESTARTS AGE @@ -88,6 +98,7 @@ springboot-docker-compose 172.30.205.137 8080/TCP 6m ``` Let's access the Springboot service. + ```bash $ minishift openshift service --in-browser springboot-docker-compose Created the new window in existing browser session. diff --git a/docs/user-guide.md b/docs/user-guide.md index c253182947..fdefae5735 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -2,20 +2,19 @@ layout: default permalink: /user-guide/ title: User Guide -redirect_from: +redirect_from: - /docs/user-guide.md/ - /docs/user-guide/ --- # User Guide -* TOC -{:toc} +- TOC + {:toc} Kompose has support for two providers: OpenShift and Kubernetes. You can choose a targeted provider using global option `--provider`. If no provider is specified, Kubernetes is set by default. - ## Kompose Convert Kompose supports conversion of V1, V2, and V3 Docker Compose files into Kubernetes and OpenShift objects. @@ -46,60 +45,60 @@ You can also provide multiple docker-compose files at the same time: ```sh $ kompose -f docker-compose.yml -f docker-guestbook.yml convert -INFO Kubernetes file "frontend-service.yaml" created -INFO Kubernetes file "mlbparks-service.yaml" created -INFO Kubernetes file "mongodb-service.yaml" created -INFO Kubernetes file "redis-master-service.yaml" created -INFO Kubernetes file "redis-slave-service.yaml" created -INFO Kubernetes file "frontend-deployment.yaml" created -INFO Kubernetes file "mlbparks-deployment.yaml" created -INFO Kubernetes file "mongodb-deployment.yaml" created -INFO Kubernetes file "mongodb-claim0-persistentvolumeclaim.yaml" created -INFO Kubernetes file "redis-master-deployment.yaml" created -INFO Kubernetes file "redis-slave-deployment.yaml" created +INFO Kubernetes file "frontend-service.yaml" created +INFO Kubernetes file "mlbparks-service.yaml" created +INFO Kubernetes file "mongodb-service.yaml" created +INFO Kubernetes file "redis-master-service.yaml" created +INFO Kubernetes file "redis-slave-service.yaml" created +INFO Kubernetes file "frontend-deployment.yaml" created +INFO Kubernetes file "mlbparks-deployment.yaml" created +INFO Kubernetes file "mongodb-deployment.yaml" created +INFO Kubernetes file "mongodb-claim0-persistentvolumeclaim.yaml" created +INFO Kubernetes file "redis-master-deployment.yaml" created +INFO Kubernetes file "redis-slave-deployment.yaml" created $ ls -mlbparks-deployment.yaml mongodb-service.yaml redis-slave-service.jsonmlbparks-service.yaml +mlbparks-deployment.yaml mongodb-service.yaml redis-slave-service.jsonmlbparks-service.yaml frontend-deployment.yaml mongodb-claim0-persistentvolumeclaim.yaml redis-master-service.yaml frontend-service.yaml mongodb-deployment.yaml redis-slave-deployment.yaml redis-master-deployment.yaml -``` +``` When multiple docker-compose files are provided the configuration is merged. Any configuration that is common will be over ridden by subsequent file. - + ### OpenShift ```sh $ kompose --provider openshift --file docker-voting.yml convert WARN [worker] Service cannot be created because of missing port. -INFO OpenShift file "vote-service.yaml" created -INFO OpenShift file "db-service.yaml" created -INFO OpenShift file "redis-service.yaml" created -INFO OpenShift file "result-service.yaml" created -INFO OpenShift file "vote-deploymentconfig.yaml" created -INFO OpenShift file "vote-imagestream.yaml" created -INFO OpenShift file "worker-deploymentconfig.yaml" created -INFO OpenShift file "worker-imagestream.yaml" created -INFO OpenShift file "db-deploymentconfig.yaml" created -INFO OpenShift file "db-imagestream.yaml" created -INFO OpenShift file "redis-deploymentconfig.yaml" created -INFO OpenShift file "redis-imagestream.yaml" created -INFO OpenShift file "result-deploymentconfig.yaml" created -INFO OpenShift file "result-imagestream.yaml" created +INFO OpenShift file "vote-service.yaml" created +INFO OpenShift file "db-service.yaml" created +INFO OpenShift file "redis-service.yaml" created +INFO OpenShift file "result-service.yaml" created +INFO OpenShift file "vote-deploymentconfig.yaml" created +INFO OpenShift file "vote-imagestream.yaml" created +INFO OpenShift file "worker-deploymentconfig.yaml" created +INFO OpenShift file "worker-imagestream.yaml" created +INFO OpenShift file "db-deploymentconfig.yaml" created +INFO OpenShift file "db-imagestream.yaml" created +INFO OpenShift file "redis-deploymentconfig.yaml" created +INFO OpenShift file "redis-imagestream.yaml" created +INFO OpenShift file "result-deploymentconfig.yaml" created +INFO OpenShift file "result-imagestream.yaml" created ``` -It also supports creating buildconfig for build directive in a service. By default, it uses the remote repo for the current git branch as the source repo, and the current branch as the source branch for the build. You can specify a different source repo and branch using ``--build-repo`` and ``--build-branch`` options respectively. +It also supports creating buildconfig for build directive in a service. By default, it uses the remote repository for the current git branch as the source repository, and the current branch as the source branch for the build. You can specify a different source repository and branch using `--build-repo` and `--build-branch` options respectively. ```sh $ kompose --provider openshift --file buildconfig/docker-compose.yml convert -WARN [foo] Service cannot be created because of missing port. -INFO OpenShift Buildconfig using git@github.com:rtnpro/kompose.git::master as source. -INFO OpenShift file "foo-deploymentconfig.yaml" created -INFO OpenShift file "foo-imagestream.yaml" created -INFO OpenShift file "foo-buildconfig.yaml" created +WARN [foo] Service cannot be created because of missing port. +INFO OpenShift Buildconfig using git@github.com:rtnpro/kompose.git::master as source. +INFO OpenShift file "foo-deploymentconfig.yaml" created +INFO OpenShift file "foo-imagestream.yaml" created +INFO OpenShift file "foo-buildconfig.yaml" created ``` -**Note**: If you are manually pushing the Openshift artifacts using ``oc create -f``, you need to ensure that you push the imagestream artifact before the buildconfig artifact, to workaround this Openshift issue: https://github.com/openshift/origin/issues/4518 . +**Note**: If you are manually pushing the Openshift artifacts using `oc create -f`, you need to ensure that you push the imagestream artifact before the buildconfig artifact, to work around this Openshift issue: https://github.com/openshift/origin/issues/4518 . ## Alternative Conversions @@ -112,6 +111,7 @@ INFO Kubernetes file "web-svc.json" created INFO Kubernetes file "redis-deployment.json" created INFO Kubernetes file "web-deployment.json" created ``` + The `*-deployment.json` files contain the Deployment objects. ```sh @@ -136,19 +136,18 @@ The `*-daemonset.yaml` files contain the Daemon Set objects ```sh $ kompose convert --controller statefulset -INFO Kubernetes file "db-service.yaml" created -INFO Kubernetes file "wordpress-service.yaml" created -INFO Kubernetes file "db-statefulset.yaml" created -INFO Kubernetes file "wordpress-statefulset.yaml" created +INFO Kubernetes file "db-service.yaml" created +INFO Kubernetes file "wordpress-service.yaml" created +INFO Kubernetes file "db-statefulset.yaml" created +INFO Kubernetes file "wordpress-statefulset.yaml" created ``` The `*statefulset-.yaml` files contain the Statefulset objects. - If you want to generate a Chart to be used with [Helm](https://github.com/kubernetes/helm) simply do: ```sh -$ kompose convert -c +$ kompose convert -c INFO Kubernetes file "web-svc.yaml" created INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "web-deployment.yaml" created @@ -175,44 +174,42 @@ explicitly define the generated resources' behavior upon conversion, like Servic The currently supported options are: -| Key | Value | -|----------------------|-------------------------------------| -| kompose.service.type | nodeport / clusterip / loadbalancer / headless | -| kompose.service.group | name to group the containers contained in a single pod | -| kompose.service.expose | true / hostnames (separated by comma) | -| kompose.service.nodeport.port | port value (string) | -| kompose.service.expose.tls-secret | secret name | -| kompose.service.expose.ingress-class-name | ingress class name | -| kompose.volume.size | kubernetes supported volume size | -| kompose.volume.storage-class-name | kubernetes supported volume storageClassName | -| kompose.volume.type | use k8s volume type, eg "configMap", "persistentVolumeClaim", "emptyDir", "hostPath" | -| kompose.controller.type | deployment / daemonset / replicationcontroller | -| kompose.image-pull-policy | kubernetes pods imagePullPolicy | -| kompose.image-pull-secret | kubernetes secret name for imagePullSecrets | -| kompose.service.healthcheck.readiness.disable | kubernetes readiness disable | -| kompose.service.healthcheck.readiness.test | kubernetes readiness exec command | -| kompose.service.healthcheck.readiness.http_get_path | kubernetes readiness httpGet path | -| kompose.service.healthcheck.readiness.http_get_port | kubernetes readiness httpGet port | -| kompose.service.healthcheck.readiness.tcp_port | kubernetes readiness tcpSocket port | -| kompose.service.healthcheck.readiness.interval | kubernetes readiness interval value | -| kompose.service.healthcheck.readiness.timeout | kubernetes readiness timeout value | -| kompose.service.healthcheck.readiness.retries | kubernetes readiness retries value | -| kompose.service.healthcheck.readiness.start_period | kubernetes readiness start_period | -| kompose.service.healthcheck.liveness.http_get_path | kubernetes liveness httpGet path | -| kompose.service.healthcheck.liveness.http_get_port | kubernetes liveness httpGet port | -| kompose.service.healthcheck.liveness.tcp_port | kubernetes liveness tcpSocket port | +| Key | Value | +| --------------------------------------------------- | ------------------------------------------------------------------------------------ | +| kompose.service.type | nodeport / clusterip / loadbalancer / headless | +| kompose.service.group | name to group the containers contained in a single pod | +| kompose.service.expose | true / hostnames (separated by comma) | +| kompose.service.nodeport.port | port value (string) | +| kompose.service.expose.tls-secret | secret name | +| kompose.service.expose.ingress-class-name | ingress class name | +| kompose.volume.size | kubernetes supported volume size | +| kompose.volume.storage-class-name | kubernetes supported volume storageClassName | +| kompose.volume.type | use k8s volume type, eg "configMap", "persistentVolumeClaim", "emptyDir", "hostPath" | +| kompose.controller.type | deployment / daemonset / replicationcontroller | +| kompose.image-pull-policy | kubernetes pods imagePullPolicy | +| kompose.image-pull-secret | kubernetes secret name for imagePullSecrets | +| kompose.service.healthcheck.readiness.disable | kubernetes readiness disable | +| kompose.service.healthcheck.readiness.test | kubernetes readiness exec command | +| kompose.service.healthcheck.readiness.http_get_path | kubernetes readiness httpGet path | +| kompose.service.healthcheck.readiness.http_get_port | kubernetes readiness httpGet port | +| kompose.service.healthcheck.readiness.tcp_port | kubernetes readiness tcpSocket port | +| kompose.service.healthcheck.readiness.interval | kubernetes readiness interval value | +| kompose.service.healthcheck.readiness.timeout | kubernetes readiness timeout value | +| kompose.service.healthcheck.readiness.retries | kubernetes readiness retries value | +| kompose.service.healthcheck.readiness.start_period | kubernetes readiness start_period | +| kompose.service.healthcheck.liveness.http_get_path | kubernetes liveness httpGet path | +| kompose.service.healthcheck.liveness.http_get_port | kubernetes liveness httpGet port | +| kompose.service.healthcheck.liveness.tcp_port | kubernetes liveness tcpSocket port | **Note**: `kompose.service.type` label should be defined with `ports` only (except for headless service), otherwise `kompose` will fail. - - - `kompose.service.type` defines the type of service to be created. For example: ```yaml version: "2" -services: +services: nginx: image: nginx dockerfile: foobar @@ -220,11 +217,11 @@ services: cap_add: - ALL container_name: foobar - labels: + labels: kompose.service.type: nodeport ``` - - `kompose.service.group` defines the group of containers included in a single pod. +- `kompose.service.group` defines the group of containers included in a single pod. For example: @@ -236,19 +233,19 @@ services: image: nginx depends_on: - logs - labels: + labels: - kompose.service.group=sidecar logs: image: busybox command: ["tail -f /var/log/nginx/access.log"] - labels: + labels: - kompose.service.group=sidecar ``` - `kompose.service.expose` defines if the service needs to be made accessible from outside the cluster or not. If the value is set to "true", the provider sets the endpoint automatically, and for any other value, the value is set as the hostname. If multiple ports are defined in a service, the first one is chosen to be the exposed. - - For the Kubernetes provider, an ingress resource is created and it is assumed that an ingress controller has already been configured. If the value is set to a comma sepatated list, multiple hostnames are supported.Hostname with path is also supported. - - For the OpenShift provider, a route is created. + - For the Kubernetes provider, an ingress resource is created, and it is assumed that an ingress controller has already been configured. If the value is set to a comma-separated list, multiple hostnames are supported. Hostname with the path is also supported. + - For the OpenShift provider, a route is created. - `kompose.service.nodeport.port` defines the port value when service type is `nodeport`, this label should only be set when the service only contains 1 port. Usually kubernetes define a port range for node port values, kompose will not validate this. - `kompose.service.expose.tls-secret` provides the name of the TLS secret to use with the Kubernetes ingress controller. This requires kompose.service.expose to be set. - `kompose.service.expose.ingress-class-name` provides the name of ingress class to use with the Kubernetes ingress controller. This requires kompose.service. @@ -288,8 +285,8 @@ services: ``` - `kompose.image-pull-secret` defines a kubernetes secret name for imagePullSecrets podspec field. -This secret will be used for pulling private images. -For example: + This secret will be used for pulling private images. + For example: ```yaml version: '2' @@ -300,8 +297,8 @@ services: kompose.image-pull-secret: "example-kubernetes-secret" ``` -- `kompose.volume.size` defines the requests storage's size in the PersistentVolumeClaim, or you can use command line parameter `--pvc-request-size`. -The priority follow label (kompose.volume.size) > command parameter(--pvc-request-size) > defaultSize (100Mi) +- `kompose.volume.size` defines the requests storage's size in the PersistentVolumeClaim, or you can use the command line parameter `--pvc-request-size`. +- The priority follows label (kompose.volume.size) > command parameter(--pvc-request-size) > defaultSize (100Mi) For example: @@ -378,7 +375,6 @@ services: kompose.image-pull-policy: "Never" ``` - For example: ```yaml @@ -412,6 +408,7 @@ services: kompose.service.healthcheck.readiness.retries: 3 kompose.service.healthcheck.readiness.start_period: 30s ``` + - `kompose.service.healthcheck.readiness` defines Kubernetes [readiness](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes) ## Restart @@ -419,7 +416,7 @@ services: If you want to create normal pods without controller you can use `restart` construct of docker-compose to define that. Follow table below to see what happens on the `restart` value. | `docker-compose` `restart` | object created | Pod `restartPolicy` | -|----------------------------|-------------------|---------------------| +| -------------------------- | ----------------- | ------------------- | | `""` | controller object | `Always` | | `always` | controller object | `Always` | | `unless-stopped` | controller object | `Always` | @@ -452,9 +449,9 @@ Please note that changing service name might break some `docker-compose` files. If the Docker Compose file has `build` or `build:context, build:dockerfile` keys, build will run when `--build` specified. -And Image will push to *docker.io* (default) when `--push-image=true` specified. +And Image will push to _docker.io_ (default) when `--push-image=true` specified. -It is possible to push to custom registry by specify `--push-image-registry`, which will override the registry from image name. +It is possible to push to custom registry by specify `--push-image-registry`, which will override the registry from image name. ### Authentication on registry @@ -463,12 +460,13 @@ Kompose uses the docker authentication from file `$DOCKER_CONFIG/config.json`, ` **This only works fine on Linux but macOS would fail when using `"credsStore": "osxkeychain"`.** However, there is an approach to push successfully on macOS, by not using `osxkeychain` for `credsStore`. To disable `osxkeychain`: -* remove `credsStore` from `config.json` file, and `docker login` again. -* for some docker desktop versions, there is a setting `Securely store Docker logins in macOS keychain`, which should be unchecked. Then restart docker desktop if needed, and `docker login` again. + +- remove `credsStore` from `config.json` file, and `docker login` again. +- for some docker desktop versions, there is a setting `Securely store Docker logins in macOS keychain`, which should be unchecked. Then restart docker desktop if needed, and `docker login` again. Now `config.json` should contain base64 encoded passwords, then push image should succeed. Working, but not safe though! Use it at your risk. -For Windows, there is also `credsStore` which is `wincred`. Technically it will fail on authentication as macOS does, but you can try the approach above like macOS too. +For Windows, there is also `credsStore` which is `wincred`. Technically it will fail on authentication as macOS does, but you can try the approach above like macOS too. ## Docker Compose Versions diff --git a/go.mod b/go.mod index a4ec3105b3..0b0cbbe604 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,6 @@ require ( github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.14.0 golang.org/x/tools v0.5.0 - gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.22.5 k8s.io/apimachinery v0.22.5 @@ -72,6 +71,7 @@ require ( golang.org/x/text v0.6.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/klog/v2 v2.80.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/index.md b/index.md index 4ca4c4bc13..6c645dc302 100644 --- a/index.md +++ b/index.md @@ -3,6 +3,7 @@ layout: default --- # Kubernetes + Compose = Kompose + ## A conversion tool to go from Docker Compose to Kubernetes ### What's Kompose? @@ -11,8 +12,8 @@ Kompose is a conversion tool for Docker Compose to container orchestrators such Why do developers love it? - - Simplify your development process with Docker Compose and then deploy your containers to a production cluster - - Convert your `docker-compose.yaml` with one simple command `kompose convert` +- Simplify your development process with Docker Compose and then deploy your containers to a production cluster +- Convert your `docker-compose.yaml` with one simple command `kompose convert` ### It's as simple as 1-2-3