├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── enhancement.yml ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yaml └── workflows │ ├── go.yml │ ├── lint.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── .golangci.yml ├── .mention-bot ├── .openvex └── templates │ ├── README.md │ └── main.openvex.json ├── .pre-commit-config.yaml ├── CONTRIBUTING.md ├── Dockerfile ├── Jenkinsfile ├── LICENSE ├── Makefile ├── OWNERS ├── README.md ├── RELEASE.md ├── SECURITY.md ├── SECURITY_CONTACTS ├── build ├── README.md └── VERSION ├── client ├── client.go ├── convert.go ├── convert_test.go ├── options.go ├── options_test.go ├── testdata │ ├── docker-compose-profiles.yaml │ └── docker-compose.yaml └── types.go ├── cmd ├── completion.go ├── convert.go ├── root.go └── version.go ├── code-of-conduct.md ├── docs ├── 404.html ├── CNAME ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── _config.yml ├── _data │ ├── dates.yml │ └── menu.yml ├── _foobar.yml ├── _includes │ ├── footer.html │ ├── meta.html │ └── navbar.html ├── _layouts │ ├── default.html │ └── index.html ├── architecture.md ├── assets │ ├── css │ │ ├── animate.css │ │ ├── bootstrap.min.css │ │ ├── github-markdown.css │ │ ├── ionicons.min.css │ │ ├── jquery.accordion.css │ │ ├── magnific-popup.css │ │ ├── owl.carousel.css │ │ ├── owl.theme.css │ │ └── style.css │ ├── favicons │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-256x256.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── mstile-150x150.png │ │ ├── safari-pinned-tab.svg │ │ └── site.webmanifest │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ ├── ionicons.woff │ │ └── ionicons.woff2 │ ├── icons │ │ ├── c1.png │ │ ├── c2.png │ │ ├── c3.png │ │ ├── c4.png │ │ ├── c5.png │ │ ├── fb.png │ │ ├── github.png │ │ ├── in.png │ │ ├── li.png │ │ ├── p1.png │ │ ├── p3.png │ │ ├── p6.png │ │ ├── rev.png │ │ ├── rev2.png │ │ ├── rev3.png │ │ ├── slack.png │ │ ├── tt.png │ │ ├── tw.png │ │ └── up.png │ ├── images │ │ ├── gh_engineer.jpg │ │ ├── logo.png │ │ ├── logo.xcf │ │ ├── logo_large.png │ │ └── placeholder.jpg │ ├── js │ │ ├── bootstrap.min.js │ │ ├── contact.js │ │ ├── custom.js │ │ ├── jquery-2.1.1.js │ │ ├── jquery.accordion.js │ │ ├── jquery.validate.min.js │ │ ├── live.js │ │ ├── menu-2.js │ │ ├── menu.js │ │ ├── plugins.js │ │ ├── popper.min.js │ │ └── validator.js │ └── video │ │ ├── cat.webm │ │ ├── coding.webm │ │ └── placeholder.mp4 ├── conversion.md ├── development.md ├── docs │ └── images │ │ ├── design_diagram.png │ │ └── kompose-maven-output-diagram.png ├── favicon.ico ├── feed.xml ├── getting-started.md ├── images │ ├── design_diagram.png │ └── kompose-maven-output-diagram.png ├── index.md ├── installation.md ├── integrations.md ├── maven-example.md └── user-guide.md ├── examples ├── compose.yaml └── web │ ├── Dockerfile │ ├── README.md │ ├── compose.yaml │ ├── go.mod │ ├── go.sum │ ├── main.go │ ├── public │ ├── index.html │ ├── logo.png │ ├── script.js │ └── style.css │ └── vendor │ ├── github.com │ ├── codegangsta │ │ └── negroni │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── logger.go │ │ │ ├── negroni.go │ │ │ ├── recovery.go │ │ │ ├── response_writer.go │ │ │ ├── response_writer_pusher.go │ │ │ └── static.go │ ├── gomodule │ │ └── redigo │ │ │ ├── LICENSE │ │ │ └── redis │ │ │ ├── commandinfo.go │ │ │ ├── conn.go │ │ │ ├── doc.go │ │ │ ├── log.go │ │ │ ├── pool.go │ │ │ ├── pubsub.go │ │ │ ├── redis.go │ │ │ ├── reflect.go │ │ │ ├── reflect_go117.go │ │ │ ├── reflect_go118.go │ │ │ ├── reply.go │ │ │ ├── scan.go │ │ │ └── script.go │ ├── gorilla │ │ └── mux │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── middleware.go │ │ │ ├── mux.go │ │ │ ├── regexp.go │ │ │ ├── route.go │ │ │ └── test_helpers.go │ └── xyproto │ │ ├── pinterface │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── pinterface.go │ │ └── simpleredis │ │ └── v2 │ │ ├── LICENSE │ │ ├── creator.go │ │ └── simpleredis.go │ └── modules.txt ├── go.mod ├── go.sum ├── gover.coverprofile ├── index.md ├── main.go ├── pkg ├── app │ └── app.go ├── kobject │ └── kobject.go ├── loader │ ├── compose │ │ ├── compose.go │ │ ├── compose_test.go │ │ └── utils.go │ └── loader.go ├── snap │ └── snapcraft.yaml ├── testutils │ ├── git.go │ └── kubernetes.go ├── transformer │ ├── kubernetes │ │ ├── k8sutils.go │ │ ├── k8sutils_test.go │ │ ├── kubernetes.go │ │ ├── kubernetes_test.go │ │ └── podspec.go │ ├── openshift │ │ ├── openshift.go │ │ ├── openshift_test.go │ │ └── utils.go │ ├── transformer.go │ ├── utils.go │ └── utils_test.go ├── utils │ ├── archive │ │ └── tar.go │ └── docker │ │ ├── build.go │ │ ├── client.go │ │ ├── image.go │ │ ├── image_test.go │ │ ├── push.go │ │ └── tag.go └── version │ └── version.go └── script ├── check-gofmt.sh ├── manual-docs-sync.sh ├── release.sh ├── test ├── README.md ├── cmd │ ├── .coverprofile │ ├── cmd_test.go │ ├── fix_detached_head.sh │ ├── globals.sh │ ├── lib.sh │ ├── tests.sh │ ├── tests_push_image.sh │ └── update-e2e.sh └── fixtures │ ├── buildargs │ ├── README.md │ ├── build │ │ └── Dockerfile │ ├── compose.yaml │ ├── envs │ └── output-os-template.json │ ├── buildconfig │ ├── build │ │ └── Dockerfile │ ├── compose-build-no-image.yaml │ ├── compose-dockerfile.yaml │ ├── compose-v3.yaml │ └── compose.yaml │ ├── change-in-volume │ ├── compose.yaml │ ├── output-k8s-empty-vols-template.yaml │ ├── output-k8s.yaml │ ├── output-os-empty-vols-template.yaml │ └── output-os.yaml │ ├── compose-env-interpolation │ ├── compose.yaml │ └── output-k8s.yaml │ ├── compose-env-no-interpolation │ ├── compose.yaml │ └── output-k8s.yaml │ ├── compose-file-env-variable │ ├── alternative-compose.yaml │ ├── compose.yaml │ └── output-k8s.yaml │ ├── compose-file-support │ ├── compose.yaml │ └── output-k8s.yaml │ ├── compose-v3.3-test │ ├── compose-config-long-warning.yaml │ ├── compose-config-long.yaml │ ├── compose-config-short-warning.yaml │ ├── compose-config-short.yaml │ ├── compose-endpoint-mode-1.yaml │ ├── compose-endpoint-mode-2.yaml │ ├── my_config.txt │ ├── output-k8s-config-long-warning.json │ ├── output-k8s-config-long.json │ ├── output-k8s-config-short-warning.json │ ├── output-k8s-config-short.json │ ├── output-k8s-endpoint-mode-1.json │ ├── output-k8s-endpoint-mode-2.json │ ├── output-os-config-long.json │ ├── output-os-config-short.json │ └── output-os-mode-1.json │ ├── configmap-file-configs │ ├── auth.txt │ ├── certs-level1 │ │ └── certs-level2 │ │ │ └── certs-level3 │ │ │ └── cert2.pem │ ├── certs │ │ └── cert1.pem │ ├── compose-1.yaml │ ├── compose-2.yaml │ ├── compose-3.yaml │ ├── output-k8s-1.yaml │ ├── output-k8s-2.yaml │ ├── output-k8s-3.yaml │ ├── output-os-1.yaml │ ├── output-os-2.yaml │ ├── output-os-3.yaml │ └── users.php │ ├── configmap-pod │ ├── bar.env │ ├── compose.yaml │ ├── foo.env │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── configmap-volume │ ├── compose-withlabel.yaml │ ├── compose.yaml │ ├── configs.tar │ ├── output-k8s-withlabel.yaml │ ├── output-k8s.yaml │ ├── output-os-withlabel.yaml │ ├── output-os.yaml │ └── tls │ │ ├── a.crt │ │ └── a.key │ ├── configmap │ ├── bar.env │ ├── compose.yaml │ ├── foo.env │ └── output-k8s-template.json │ ├── controller │ ├── compose-controller-label-v3.yaml │ ├── compose-controller-label.yaml │ ├── compose-global.yaml │ ├── compose.yaml │ ├── output-k8s-controller-template.json │ ├── output-k8s-controller-v3-template.json │ ├── output-k8s-daemonset-template.json │ ├── output-k8s-deployment-template.json │ ├── output-k8s-global-deployment-template.json │ ├── output-k8s-global-template.json │ ├── output-k8s-rc-template.json │ └── output-os-controller-v3-template.json │ ├── cronjob │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── deploy │ ├── labels │ │ ├── compose.yaml │ │ └── output-k8s.yaml │ └── placement │ │ ├── compose-placement.yaml │ │ ├── output-placement-k8s.yaml │ │ └── output-placement-os.yaml │ ├── dockerfilepath │ └── compose.yaml │ ├── domain │ ├── compose-v3.yaml │ ├── compose.yaml │ ├── output-k8s.json │ └── output-os.json │ ├── entrypoint-command │ ├── compose.yaml │ ├── output-k8s-template.json │ └── output-os-template.json │ ├── env-dotenv │ ├── .env │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── env-multiple │ ├── compose.yaml │ ├── env1 │ │ └── hadoop-hive-namenode.env │ ├── env2 │ │ └── hadoop-hive-namenode.env │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── env │ ├── compose.yaml │ ├── hadoop-hive-namenode.env │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── envfile-interpolation │ ├── .env │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── envvars-interpolation │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── envvars-separators │ ├── compose.yaml │ └── output-k8s-template.json │ ├── envvars-with-status │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── etherpad │ ├── README.md │ ├── docker-compose-no-image.yml │ ├── docker-compose-no-ports.yml │ ├── docker-compose.yml │ ├── envs │ ├── output-k8s-template.json │ └── output-os-template.json │ ├── examples │ ├── output-counter-k8s.json │ ├── output-counter-os.json │ ├── output-counter-v3-k8s.json │ ├── output-counter-v3-os.json │ ├── output-gitlab-k8s.json │ ├── output-gitlab-os.json │ ├── output-k8s.json │ ├── output-os.json │ ├── output-v3-k8s.json │ ├── output-v3-os.json │ ├── output-voting-k8s.json │ └── output-voting-os.json │ ├── expose │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── external-traffic-policy │ ├── compose-v1.yaml │ ├── compose-v2.yaml │ ├── output-k8s-v1.yaml │ ├── output-k8s-v2.yaml │ ├── output-os-v1.yaml │ └── output-os-v2.yaml │ ├── fsgroup │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── gitlab │ ├── README.md │ ├── docker-compose.yml │ ├── envs │ ├── output-k8s-template.json │ └── output-os-template.json │ ├── healthcheck │ ├── compose-healthcheck.yaml │ ├── output-healthcheck-k8s.yaml │ └── output-healthcheck-os.yaml │ ├── host-port-protocol │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── hpa │ ├── compose.yaml │ └── output-k8s.yaml │ ├── image-pull-policy │ ├── compose-files │ │ ├── v12-fail-image-pull-policy.yml │ │ ├── v12-image-pull-policy.yml │ │ └── v3-image-pull-policy.yml │ └── provider-files │ │ ├── kubernetes-v12-image-pull-policy.json │ │ └── kubernetes-v3-image-pull-policy.json │ ├── image-pull-secret │ ├── compose-files │ │ └── docker-compose-image-pull-secret.yml │ └── provider-files │ │ └── kubernetes-image-pull-secret.json │ ├── initcontainer │ ├── compose.yaml │ └── output-k8s.yaml │ ├── keyonly-envs │ ├── env.yml │ ├── envs │ └── output-k8s-template.json │ ├── label-port │ └── docker-compose.yml │ ├── label │ ├── compose.yaml │ └── output-k8s.yaml │ ├── multiple-files │ ├── first.yaml │ ├── output-k8s.yaml │ ├── output-os.yaml │ └── second.yaml │ ├── multiple-type-volumes │ ├── compose.yaml │ ├── output-k8s.yaml │ ├── output-os.yaml │ └── tls │ │ ├── a.crt │ │ └── a.key │ ├── namespace │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── network-mode-service │ ├── compose.yaml │ └── output-k8s.yaml │ ├── network-policies │ ├── compose.yaml │ └── output-k8s.yaml │ ├── network │ ├── compose-v3.yaml │ ├── output-k8s.json │ └── output-os.json │ ├── nginx-node-redis │ ├── README.md │ ├── compose-v3.yaml │ ├── compose.yaml │ ├── nginx │ │ ├── Dockerfile │ │ └── nginx.conf │ ├── node │ │ ├── Dockerfile │ │ ├── index.js │ │ ├── package.json │ │ └── test │ │ │ └── dummyTest.js │ ├── output-k8s-template-v3.json │ ├── output-k8s-template.json │ ├── output-os-template-v3.json │ ├── output-os-template.json │ └── output-os.json │ ├── no-profile-warning │ └── compose.yaml │ ├── ports-with-ip │ ├── docker-compose.yml │ ├── output-k8s-template.json │ └── output-k8s.json │ ├── pvc-request-size │ ├── compose.yaml │ ├── output-k8s.json │ └── output-os.json │ ├── read-only │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── redis-example │ └── compose.yaml │ ├── resources-lowercase │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── secrets │ ├── docker-compose-secrets-long.yml │ ├── docker-compose-secrets-short.yml │ ├── my_secret.txt │ ├── output-long-k8s.json │ ├── output-long-os.json │ ├── output-short-k8s.json │ └── output-short-os.json │ ├── service-group │ ├── compose.yaml │ └── output-k8s.yaml │ ├── service-label │ ├── docker-compose.yaml │ ├── output-k8s.json │ └── output-oc.json │ ├── service-name-change │ ├── docker-compose.yml │ ├── output-k8s-template.json │ └── output-os-template.json │ ├── single-file-output │ ├── compose.yaml │ └── output-k8s.yaml │ ├── statefulset │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── stdin-true │ ├── docker-compose.yml │ ├── output-k8s-template.json │ └── output-os-template.json │ ├── stdin │ ├── docker-compose.yaml │ ├── output-k8s.json │ └── output.json │ ├── storage-class-name │ ├── compose.yaml │ ├── output-k8s.json │ └── output-os.json │ ├── tty-true │ ├── docker-compose.yml │ ├── output-k8s-template.json │ ├── output-oc.json │ └── output-os-template.json │ ├── unused │ ├── expose-service │ │ ├── compose-files │ │ │ ├── docker-compose-expose-hostname-multiple-ports.yml │ │ │ ├── docker-compose-expose-hostname-tls.yml │ │ │ ├── docker-compose-expose-hostname.yml │ │ │ ├── docker-compose-expose-multiple-hostname-tls.yml │ │ │ ├── docker-compose-expose-multiple-hostname.yml │ │ │ ├── docker-compose-expose-true-multiple-ports.yml │ │ │ └── docker-compose-expose-true.yml │ │ └── provider-files │ │ │ ├── kubernetes-expose-hostname-multiple-ports.json │ │ │ ├── kubernetes-expose-hostname-tls.json │ │ │ ├── kubernetes-expose-hostname.json │ │ │ ├── kubernetes-expose-multiple-hostname-tls.json │ │ │ ├── kubernetes-expose-multiple-hostname.json │ │ │ ├── kubernetes-expose-true-multiple-ports.json │ │ │ ├── kubernetes-expose-true.json │ │ │ ├── openshift-expose-hostname-multiple-ports.json │ │ │ ├── openshift-expose-hostname.json │ │ │ ├── openshift-expose-true-multiple-ports.json │ │ │ └── openshift-expose-true.json │ ├── merge-multiple-compose │ │ ├── base.yml │ │ ├── compose-new-service-prob.yml │ │ ├── compose-port-base.yml │ │ ├── compose-port-prod.yml │ │ ├── dev.yml │ │ ├── first_config.txt │ │ ├── other-toplevel-base.yml │ │ ├── other-toplevel-dev.yml │ │ ├── other-toplevel-ext.yml │ │ ├── other-toplevel-override.yml │ │ ├── output-base-template.json │ │ ├── output-compose-new-service-template.json │ │ ├── output-compose-port-template.json │ │ ├── output-openshift-template.json │ │ ├── output-other-toplevel-merge-template.json │ │ ├── output-other-toplevel-override-template.json │ │ ├── output-service-merge-concat-template.json │ │ ├── second_config.txt │ │ ├── service-merge-concat-base.yml │ │ └── service-merge-concat-override.yml │ └── v3 │ │ ├── docker-compose-3.5.yaml │ │ ├── docker-compose-deploy.yaml │ │ ├── docker-compose-env-subs.yaml │ │ ├── docker-compose-env.yaml │ │ ├── docker-compose-full-example.yaml │ │ ├── docker-compose-memcpu-partial.yaml │ │ ├── docker-compose-memcpu.yaml │ │ ├── docker-compose-unset-env.yaml │ │ ├── docker-compose-volumes.yaml │ │ ├── docker-compose.yaml │ │ ├── example1.env │ │ ├── example2.env │ │ ├── output-deploy-k8s.json │ │ ├── output-deploy-os.json │ │ ├── output-env-k8s.json │ │ ├── output-env-subs.json │ │ ├── output-k8s-3.5.json │ │ ├── output-k8s-full-example-template.json │ │ ├── output-k8s-full-example.json │ │ ├── output-k8s-template.json │ │ ├── output-memcpu-k8s.json │ │ ├── output-memcpu-partial-k8s.json │ │ ├── output-os-full-example.json │ │ ├── output-os-template.json │ │ ├── output-unset-env-k8s.json │ │ └── output-volumes-k8s-template.json │ ├── v2 │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── v3.0 │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── vols-subpath │ ├── compose.yaml │ ├── output-k8s.yaml │ └── output-os.yaml │ ├── volume-mounts │ ├── hostpath │ │ ├── docker-compose-v3.yml │ │ ├── docker-compose.yml │ │ ├── output-k8s-template.json │ │ └── output-os-template.json │ ├── named-volume │ │ ├── docker-compose-v3.yml │ │ ├── docker-compose.yml │ │ ├── output-k8s-template.json │ │ ├── output-k8s-v3.json │ │ └── output-os-template.json │ ├── simple-vol-mounts │ │ ├── docker-compose.yml │ │ ├── output-k8s-template.json │ │ └── output-os-template.json │ ├── tmpfs │ │ ├── docker-compose.yml │ │ ├── output-k8s-template.json │ │ └── output-os-template.json │ ├── volumes-from │ │ ├── docker-compose-case.yml │ │ ├── docker-compose.yml │ │ ├── output-k8s-case.json │ │ ├── output-k8s-template.json │ │ ├── output-os-case.json │ │ └── output-os-template.json │ └── windows │ │ ├── compose.yaml │ │ ├── output-k8s.yaml │ │ └── output-os.yaml │ └── yaml-and-yml │ ├── docker-compose.yaml │ ├── output-k8s-template.json │ ├── output-os-template.json │ └── yml │ ├── docker-compose.yml │ ├── output-k8s-template.json │ └── output-os-template.json └── test_in_container ├── Dockerfile └── run.sh /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Kubernetes Community Slack 4 | url: https://kubernetes.slack.com 5 | about: "Use the #kompose channel" 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.yml: -------------------------------------------------------------------------------- 1 | name: Enhancement Tracking Issue 2 | description: Provide supporting details for a feature in development 3 | labels: kind/feature 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: "## Thank you for contributing to our Kompose!" 8 | - type: textarea 9 | id: feature 10 | attributes: 11 | label: What would you like to be added? 12 | description: | 13 | Describe what feature/enhancement that you want to be added to Kompose. 14 | validations: 15 | required: true 16 | 17 | - type: textarea 18 | id: rationale 19 | attributes: 20 | label: Why is this needed? 21 | validations: 22 | required: true 23 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### What type of PR is this? 2 | 3 | 10 | 11 | #### What this PR does / why we need it: 12 | 13 | #### Which issue(s) this PR fixes: 14 | 18 | Fixes # 19 | 20 | #### Special notes for your reviewer: 21 | -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 2 | 3 | version: 2 4 | 5 | updates: 6 | - commit-message: 7 | include: "scope" 8 | prefix: "chore(deps)" 9 | directory: "/" 10 | open-pull-requests-limit: 10 11 | package-ecosystem: "gomod" 12 | schedule: 13 | interval: "daily" 14 | 15 | - commit-message: 16 | include: "scope" 17 | prefix: "chore(ci)" 18 | directory: "/" 19 | open-pull-requests-limit: 10 20 | package-ecosystem: "github-actions" 21 | schedule: 22 | interval: "daily" 23 | -------------------------------------------------------------------------------- /.github/workflows/go.yml: -------------------------------------------------------------------------------- 1 | name: Go 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | env: 9 | # Avoid noisy outputs like "tput: No value for $TERM and no -T specified" 10 | TERM: dumb 11 | 12 | jobs: 13 | 14 | build: 15 | name: Build 16 | runs-on: ubuntu-latest 17 | steps: 18 | 19 | - name: Set up Go 1.x 20 | uses: actions/setup-go@v5 21 | with: 22 | go-version: ^1.21 23 | id: go 24 | 25 | - name: Check out code into the Go module directory 26 | uses: actions/checkout@v4 27 | 28 | - name: Build 29 | run: make bin 30 | 31 | - name: Upload a Build Artifact 32 | uses: actions/upload-artifact@v4 33 | with: 34 | name: "kompose" 35 | path: "kompose" 36 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: lint 2 | on: 3 | pull_request: 4 | jobs: 5 | lint: 6 | strategy: 7 | matrix: 8 | go: [1.21, 1.22] 9 | name: lint 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: "Checkout" 13 | uses: actions/checkout@v4 14 | - name: "Install golang" 15 | uses: actions/setup-go@v5 16 | with: 17 | go-version: ${{ matrix.go }} 18 | - name: "Run go vet" 19 | run: "go vet ./pkg/..." 20 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Kompose CI 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | env: 8 | # Avoid noisy outputs like "tput: No value for $TERM and no -T specified" 9 | TERM: dumb 10 | jobs: 11 | test: 12 | name: Test with ${{ matrix.go }} and CROSS_COMPILE=${{ matrix.cross_compile }} 13 | runs-on: ubuntu-latest 14 | strategy: 15 | matrix: 16 | go: [1.21, 1.22] 17 | cross_compile: [true, false] 18 | steps: 19 | - uses: actions/checkout@v4 20 | - uses: actions/setup-go@v5 21 | with: 22 | go-version: ${{ matrix.go }} 23 | - name: Install dyff 24 | run: go install github.com/homeport/dyff/cmd/dyff@v1.5.8 25 | - name: Run tests 26 | run: make test 27 | - name: Perform cross compile 28 | if: ${{ matrix.cross_compile }} 29 | run: make cross 30 | docs: 31 | name: Build docs and Coveralls integration 32 | runs-on: ubuntu-latest 33 | needs: test 34 | steps: 35 | - uses: actions/checkout@v4 36 | - uses: actions/setup-go@v5 37 | with: 38 | go-version: ^1.21 39 | - name: Install dyff 40 | run: go install github.com/homeport/dyff/cmd/dyff@v1.5.8 41 | - name: Create .coverprofile for each targeted directory by re:running tests 42 | run: make test 43 | - name: Collect all .coverprofile files and save it to one file gover.coverprofile 44 | run: gover 45 | - name: Send coverage 46 | run: goveralls -coverprofile=gover.coverprofile -service=github 47 | env: 48 | # As per https://github.com/mattn/goveralls#github-actions 49 | COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # KOMPOSE SPECIFIC 3 | # 4 | 5 | # Ignore compiled Kompose files 6 | kompose 7 | bin 8 | /docker-compose.yaml 9 | /docker-compose.yml 10 | /compose.yaml 11 | /compose.yml 12 | changes.txt 13 | 14 | # Ignore site documents / when switching branches 15 | docs/_site/ 16 | docs/.jekyll-cache/ 17 | docs/.git/ 18 | docs/.gitignore 19 | _site/ 20 | .jekyll-cache/ 21 | 22 | # 23 | # GO SPECIFIC 24 | # 25 | 26 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 27 | *.o 28 | *.a 29 | *.so 30 | 31 | # Folders 32 | _obj 33 | _test 34 | 35 | # Architecture specific extensions/prefixes 36 | *.[568vq] 37 | [568vq].out 38 | 39 | *.cgo1.go 40 | *.cgo2.c 41 | _cgo_defun.c 42 | _cgo_gotypes.go 43 | _cgo_export.* 44 | 45 | _testmain.go 46 | 47 | *.exe 48 | *.test 49 | *.prof 50 | 51 | # Output of the go coverage tool, specifically when used with LiteIDE 52 | *.out 53 | 54 | # Coveralls files 55 | .coverprofile 56 | 57 | # 58 | # VIM SPECIFIC 59 | # 60 | 61 | # swap 62 | [._]*.s[a-w][a-z] 63 | [._]s[a-w][a-z] 64 | 65 | # session 66 | Session.vim 67 | 68 | # temporary 69 | .netrwhist 70 | *~ 71 | 72 | # auto-generated tag files 73 | tags 74 | 75 | # IntelliJ IDE specific 76 | .idea 77 | 78 | .DS_Store 79 | 80 | # VSCode specific 81 | .vscode 82 | 83 | # Client Test generated files 84 | client/testdata/generated 85 | 86 | 87 | pkg/mod -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/.gitmodules -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | # Golang CI pipeline configuration 2 | linters: 3 | disable-all: true 4 | 5 | # Run golangci-lint.yml linters to see the list of all linters 6 | # Please keep them sorted alphabetically 7 | enable: 8 | - bodyclose 9 | - deadcode 10 | - depguard 11 | # - dogsled 12 | # - errcheck 13 | # - goconst 14 | - goimports 15 | # - staticcheck 16 | - goprintffuncname 17 | # - gosimple 18 | - govet 19 | # - ineffassign 20 | - misspell 21 | # - nakedret 22 | - nolintlint 23 | - rowserrcheck 24 | - structcheck 25 | - stylecheck 26 | - typecheck 27 | - unconvert 28 | - varcheck 29 | - whitespace 30 | -------------------------------------------------------------------------------- /.mention-bot: -------------------------------------------------------------------------------- 1 | { 2 | "maxReviewers": 2, 3 | "numFilesToCheck": 5, 4 | "message": "@pullRequester, thank you for the pull request! We'll request some people to review your PR. @reviewers, please review this.", 5 | "fileBlacklist": ["*.md"], 6 | "userBlacklist": ["ngtuna", "janetkuo", "sebgoa", "dustymabe", "gitlawr"], 7 | "actions": ["opened", "labeled"], 8 | "skipAlreadyMentionedPR": true, 9 | "createReviewRequest": true 10 | } 11 | -------------------------------------------------------------------------------- /.openvex/templates/README.md: -------------------------------------------------------------------------------- 1 | # OpenVEX Templates Directory 2 | 3 | This directory contains the OpenVEX data for this repository. 4 | The files stored in this directory are used as templates by 5 | `vexctl generate` when generating VEX data for a release or 6 | a specific artifact. 7 | 8 | To add new statements to publish data about a vulnerability, 9 | download [vexctl](https://github.com/openvex/vexctl) 10 | and append new statements using `vexctl add`. For example: 11 | ``` 12 | vexctl add --in-place main.openvex.json pkg:oci/test CVE-2014-1234567 fixed 13 | ``` 14 | That will add a new VEX statement expressing that the impact of 15 | CVE-2014-1234567 is under investigation in the test image. When 16 | cutting a new release, for `pkg:oci/test` the new file will be 17 | incorporated to the relase's VEX data. 18 | 19 | ## Read more about OpenVEX 20 | 21 | To know more about generating, publishing and using VEX data 22 | in your project, please check out the vexctl repository and 23 | documentation: https://github.com/openvex/vexctl 24 | 25 | OpenVEX also has an examples repository with samples and docs: 26 | https://github.com/openvex/examples 27 | 28 | -------------------------------------------------------------------------------- /.openvex/templates/main.openvex.json: -------------------------------------------------------------------------------- 1 | { 2 | "@context": "https://openvex.dev/ns/v0.2.0", 3 | "@id": "https://openvex.dev/docs/public/vex-6f9001fd8630edd2996df09f345882066d7b5bf512e54af918343d278640ecd0", 4 | "author": "vexctl (automated template)", 5 | "timestamp": "2023-12-15T19:10:43.910365Z", 6 | "version": 1, 7 | "statements": [] 8 | } 9 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v5.0.0 4 | hooks: 5 | - id: trailing-whitespace 6 | - id: end-of-file-fixer 7 | - id: check-added-large-files 8 | - repo: https://github.com/dnephin/pre-commit-golang 9 | rev: v0.5.1 10 | hooks: 11 | - id: go-fmt 12 | - id: go-imports 13 | - id: golangci-lint 14 | - id: go-unit-tests 15 | - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook 16 | rev: v9.18.0 17 | hooks: 18 | - id: commitlint 19 | stages: [commit-msg] 20 | additional_dependencies: ["@commitlint/config-conventional"] 21 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing guidelines 2 | 3 | ## How to become a contributor and submit your own code 4 | 5 | ### Contributor License Agreements 6 | 7 | We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. 8 | 9 | Please fill out either the individual or corporate Contributor License Agreement (CLA). 10 | 11 | - 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. 12 | - If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA. 13 | 14 | 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. 15 | 16 | ### Contributing A Patch 17 | 18 | 1. Submit an issue describing your proposed change to the repo in question. 19 | 2. The [repo owners](OWNERS) will respond to your issue promptly. 20 | 3. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above). 21 | 4. Fork the desired repo, develop and test your code changes. 22 | 5. Submit a pull request. 23 | 24 | Note: Code-related PR's require one ACK / LGTM from a maintainer or core contributor. Doc-related PR's require either one or none depending on the content changed (for example, a spec change would require one, but a spelling error would require none). 25 | 26 | ### Adding dependencies 27 | 28 | If your patch depends on new packages, make sure that both `go.mod` and `go.sum` are updated properly. Also we recommend you to execute `go mod tidy` before sending a pull request. 29 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Alpine Builder 2 | FROM alpine AS builder 3 | 4 | RUN apk add --no-cache curl 5 | COPY ./build/VERSION VERSION 6 | RUN \ 7 | version=$(cat VERSION) && \ 8 | ARCH=$(uname -m | sed 's/armv7l/arm/g' | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') && \ 9 | curl -L \ 10 | "https://github.com/kubernetes/kompose/releases/download/v${version}/kompose-linux-${ARCH}" \ 11 | -o kompose && \ 12 | chmod +x kompose 13 | 14 | # Runtime 15 | FROM alpine 16 | 17 | COPY --from=builder /kompose /usr/bin/kompose 18 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | @Library('github.com/fabric8io/fabric8-pipeline-library@master') 2 | def dummy 3 | goTemplate{ 4 | dockerNode{ 5 | goMake{ 6 | githubOrganisation = 'kubernetes' 7 | dockerOrganisation = 'fabric8' 8 | project = 'kompose' 9 | makeCommand = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/usr/local/:/go/bin:/home/jenkins/go/bin \ 10 | && bash script/test/cmd/fix_detached_head.sh && make test" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | # See the OWNERS file documentation: 2 | # https://github.com/kubernetes/community/blob/master/contributors/devel/owners.md 3 | 4 | reviewers: 5 | - cdrage 6 | - hangyan 7 | - TessaIO 8 | 9 | approvers: 10 | - cdrage 11 | - hangyan 12 | - TessaIO 13 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Release Process 2 | 3 | The process is as follows: 4 | 5 | 1. A PR proposing a new release with a changelog since the last release 6 | 1. At least 2 or more [OWNERS](OWNERS) must LGTM this release 7 | 1. The release PR is closed 8 | 1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` 9 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Security Announcements 4 | 5 | Join the [kubernetes-security-announce] group for security and vulnerability announcements. 6 | 7 | You can also subscribe to an RSS feed of the above using [this link][kubernetes-security-announce-rss]. 8 | 9 | ## Reporting a Vulnerability 10 | 11 | Instructions for reporting a vulnerability can be found on the 12 | [Kubernetes Security and Disclosure Information] page. 13 | 14 | ## Supported Versions 15 | 16 | Information about supported Kubernetes versions can be found on the 17 | [Kubernetes version and version skew support policy] page on the Kubernetes website. 18 | 19 | [kubernetes-security-announce]: https://groups.google.com/forum/#!forum/kubernetes-security-announce 20 | [kubernetes-security-announce-rss]: https://groups.google.com/forum/feed/kubernetes-security-announce/msgs/rss_v2_0.xml?num=50 21 | [Kubernetes version and version skew support policy]: https://kubernetes.io/docs/setup/release/version-skew-policy/#supported-versions 22 | [Kubernetes Security and Disclosure Information]: https://kubernetes.io/docs/reference/issues-security/security/#report-a-vulnerability 23 | -------------------------------------------------------------------------------- /SECURITY_CONTACTS: -------------------------------------------------------------------------------- 1 | # Defined below are the security contacts for this repo. 2 | # 3 | # They are the contact point for the Product Security Committee to reach out 4 | # to for triaging and handling of incoming issues. 5 | # 6 | # The below names agree to abide by the 7 | # [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) 8 | # and will be removed and replaced if they violate that agreement. 9 | # 10 | # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE 11 | # INSTRUCTIONS AT https://kubernetes.io/security/ 12 | 13 | cdrage 14 | kadel 15 | hangyan 16 | janetkuo 17 | ngtuna 18 | sebgoa 19 | AhmedGrati 20 | -------------------------------------------------------------------------------- /build/VERSION: -------------------------------------------------------------------------------- 1 | 1.36.0 2 | -------------------------------------------------------------------------------- /client/client.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | type Kompose struct { 4 | suppressWarnings bool 5 | verbose bool 6 | errorOnWarning bool 7 | } 8 | 9 | func NewClient(opts ...Opt) (*Kompose, error) { 10 | k := &Kompose{ 11 | suppressWarnings: false, 12 | verbose: false, 13 | errorOnWarning: false, 14 | } 15 | for _, op := range opts { 16 | if err := op(k); err != nil { 17 | return nil, err 18 | } 19 | } 20 | return k, nil 21 | } 22 | -------------------------------------------------------------------------------- /client/options.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | // Opt is a configuration option to initialize a client 4 | type Opt func(*Kompose) error 5 | 6 | func WithSuppressWarnings() Opt { 7 | return func(k *Kompose) error { 8 | k.suppressWarnings = true 9 | return nil 10 | } 11 | } 12 | 13 | func WithVerboseOutput() Opt { 14 | return func(k *Kompose) error { 15 | k.verbose = true 16 | return nil 17 | } 18 | } 19 | 20 | func WithErrorOnWarning() Opt { 21 | return func(k *Kompose) error { 22 | k.errorOnWarning = true 23 | return nil 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /client/testdata/docker-compose-profiles.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | backend: 4 | image: dummy:tag 5 | profiles: ['hello', 'world'] 6 | ports: 7 | - "80:80" 8 | frontend: 9 | image: dummy:tag 10 | profiles: [ 'hello' ] 11 | ports: 12 | - "80:80" 13 | database: 14 | image: dummy:tag 15 | profiles: [ 'world' ] 16 | ports: 17 | - "80:80" 18 | -------------------------------------------------------------------------------- /client/testdata/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | web: 4 | image: nginx:latest 5 | ports: 6 | - "80:80" 7 | 8 | -------------------------------------------------------------------------------- /cmd/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package cmd 18 | 19 | import ( 20 | "fmt" 21 | 22 | "github.com/kubernetes/kompose/pkg/version" 23 | "github.com/spf13/cobra" 24 | ) 25 | 26 | // versionCmd represents the version command 27 | var versionCmd = &cobra.Command{ 28 | Use: "version", 29 | Short: "Print the version of Kompose", 30 | Run: func(cmd *cobra.Command, args []string) { 31 | // See pkg/version/version.go for more information as to why we use the git commit / hash value 32 | fmt.Println(version.VERSION + " (" + version.GITCOMMIT + ")") 33 | }, 34 | } 35 | 36 | func init() { 37 | RootCmd.AddCommand(versionCmd) 38 | } 39 | -------------------------------------------------------------------------------- /code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Kubernetes Community Code of Conduct 2 | 3 | Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) 4 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /404.html 3 | layout: default 4 | --- 5 | 6 | 19 | 20 |
21 |

404

22 | 23 |

Page not found :(

24 |

The requested page could not be found.

25 |
26 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | kompose.io -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | # Hello! This is where you manage which Jekyll version is used to run. 3 | # When you want to use a different version, change it below, save the 4 | # file and run `bundle install`. Run Jekyll with `bundle exec`, like so: 5 | # 6 | # bundle exec jekyll serve 7 | # 8 | # This will help ensure the proper Jekyll version is running. 9 | # Happy Jekylling! 10 | gem "jekyll", "~> 4.0.0" 11 | # This is the default theme for new Jekyll sites. You may change this to anything you like. 12 | gem "minima", "~> 2.5" 13 | # If you want to use GitHub Pages, remove the "gem "jekyll"" above and 14 | # uncomment the line below. To upgrade, run `bundle update github-pages`. 15 | # gem "github-pages", group: :jekyll_plugins 16 | # If you have any plugins, put them here! 17 | group :jekyll_plugins do 18 | gem "jekyll-feed", "~> 0.12" 19 | end 20 | 21 | # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem 22 | # and associated library. 23 | install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do 24 | gem "tzinfo", "~> 1.2" 25 | gem "tzinfo-data" 26 | end 27 | 28 | # Performance-booster for watching directories on Windows 29 | gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? 30 | 31 | gem "jekyll-redirect-from" 32 | 33 | -------------------------------------------------------------------------------- /docs/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2016 GochoMugo 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated 7 | documentation files (the "Software"), to deal in the Software 8 | without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, 10 | and/or sell copies of the Software, and to permit persons to 11 | whom the Software is furnished to do so, subject to the 12 | following conditions: 13 | 14 | The above copyright notice and this permission notice shall 15 | be included in all copies or substantial portions of the 16 | Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 19 | KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 20 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 21 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 22 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 23 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 24 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | View the site via: 2 | 3 | ```sh 4 | bundle exec jekyll serve . 5 | ``` 6 | 7 | And visiting `localhost:4000` on your browser. 8 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | title: Kompose 2 | name: Kompose 3 | email: foo@gmail.com 4 | github_page: https://github.com/kubernetes/kompose 5 | slack_page: https://slack.k8s.io 6 | description: >- # this means to ignore newlines until "baseurl:" 7 | Convert your Docker Compose file to Kubernetes or OpenShift 8 | baseurl: "" # the subpath of your site, e.g. /blog 9 | url: "" # the base hostname & protocol for your site, e.g. http://example.com 10 | year: 2024 11 | 12 | # Google Analytics number (starts with UA?) 13 | analytics: 12345 14 | 15 | instagram: https://www.instagram.com 16 | facebook: https://www.facebook.com 17 | 18 | # Build settings 19 | theme: minima 20 | plugins: 21 | - jekyll-feed 22 | -------------------------------------------------------------------------------- /docs/_data/dates.yml: -------------------------------------------------------------------------------- 1 | - date: "Saturday May 8" 2 | green: 20 3 | yellow: 20 4 | red: 20 5 | - date: "Monday May 17" 6 | green: 20 7 | yellow: 20 8 | red: 20 9 | - date: "Monday May 31" 10 | green: 20 11 | yellow: 20 12 | red: 20 13 | - date: "Monday June 7" 14 | green: 20 15 | yellow: 20 16 | red: 20 17 | - date: "Monday June 14" 18 | green: 20 19 | yellow: 20 20 | red: 20 21 | - date: "Monday June 21" 22 | green: 20 23 | yellow: 20 24 | red: 20 25 | - date: "Monday July 5" 26 | green: 20 27 | yellow: 20 28 | red: 20 29 | - date: "Monday July 19" 30 | green: 20 31 | yellow: 20 32 | red: 20 33 | - date: "Monday July 26" 34 | green: 20 35 | yellow: 20 36 | red: 20 37 | - date: "Monday August 9" 38 | green: 20 39 | yellow: 20 40 | red: 20 41 | - date: "Monday August 16" 42 | green: 20 43 | yellow: 20 44 | red: 20 45 | - date: "Monday August 23" 46 | green: 20 47 | yellow: 20 48 | red: 20 49 | - date: "Monday August 30" 50 | green: 20 51 | yellow: 20 52 | red: 20 53 | - date: "Monday September 13" 54 | green: 20 55 | yellow: 20 56 | red: 20 57 | - date: "Friday September 24" 58 | green: 20 59 | yellow: 20 60 | red: 20 61 | - date: "Monday September 27" 62 | green: 20 63 | yellow: 20 64 | red: 20 65 | - date: "Monday October 4" 66 | green: 20 67 | yellow: 20 68 | red: 20 69 | - date: "Sunday October 10" 70 | green: 20 71 | yellow: 20 72 | red: 20 73 | -------------------------------------------------------------------------------- /docs/_data/menu.yml: -------------------------------------------------------------------------------- 1 | other_links: 2 | "Installation": "/installation/" 3 | "Getting Started": "/getting-started/" 4 | "User Guide": "/user-guide/" 5 | "Conversion Matrix": "/conversion/" 6 | "Architecture": "/architecture/" 7 | -------------------------------------------------------------------------------- /docs/_foobar.yml: -------------------------------------------------------------------------------- 1 | dates: 2 | "May 8th 2021" 3 | -------------------------------------------------------------------------------- /docs/_includes/navbar.html: -------------------------------------------------------------------------------- 1 | 2 | 19 | -------------------------------------------------------------------------------- /docs/assets/css/jquery.accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Accordion 0.0.1 3 | * (c) 2014 Victor Fernandez 4 | * MIT Licensed. 5 | */ 6 | 7 | /* Requirements */ 8 | 9 | [data-accordion] [data-content] { 10 | overflow: hidden; 11 | max-height: 0; 12 | } 13 | 14 | /* Basic Theme */ 15 | 16 | [data-accordion-group] { 17 | padding: 20px; 18 | box-shadow: 0 0px 15px rgba(0,0,0,0.06); 19 | } 20 | 21 | [data-control] { 22 | cursor: pointer; 23 | } 24 | 25 | [data-accordion] { 26 | line-height: 1; 27 | } 28 | 29 | [data-control], 30 | [data-content] > * { 31 | border-bottom: 1px solid #EEE; 32 | padding: 10px; 33 | } 34 | 35 | [data-content] [data-accordion] { 36 | border: 0; 37 | padding: 0; 38 | } 39 | 40 | [data-accordion] [data-control] { 41 | position: relative; 42 | padding-right: 40px; 43 | } 44 | 45 | [data-accordion] > [data-control]:after { 46 | content: ""; 47 | position: absolute; 48 | right: 10px; 49 | top: 12px; 50 | font-size: 25px; 51 | font-weight: 200; 52 | color: #444; 53 | height: 15px; 54 | width: 24px; 55 | background: url('../images/down.png') center center no-repeat; 56 | background-size: 50%; 57 | } 58 | 59 | [data-accordion].open > [data-control]:after { 60 | -webkit-transform: rotate(-180deg); 61 | -ms-transform: rotate(-180deg); 62 | transform: rotate(-180deg); 63 | } 64 | -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/favicons/android-chrome-256x256.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/assets/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /docs/assets/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /docs/assets/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/favicons/favicon.ico -------------------------------------------------------------------------------- /docs/assets/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /docs/assets/favicons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.14, written by Peter Selinger 2001-2017 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/assets/favicons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/assets/favicons/android-chrome-256x256.png", 12 | "sizes": "256x256", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /docs/assets/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/fonts/ionicons.eot -------------------------------------------------------------------------------- /docs/assets/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/fonts/ionicons.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/fonts/ionicons.woff -------------------------------------------------------------------------------- /docs/assets/fonts/ionicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/fonts/ionicons.woff2 -------------------------------------------------------------------------------- /docs/assets/icons/c1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/c1.png -------------------------------------------------------------------------------- /docs/assets/icons/c2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/c2.png -------------------------------------------------------------------------------- /docs/assets/icons/c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/c3.png -------------------------------------------------------------------------------- /docs/assets/icons/c4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/c4.png -------------------------------------------------------------------------------- /docs/assets/icons/c5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/c5.png -------------------------------------------------------------------------------- /docs/assets/icons/fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/fb.png -------------------------------------------------------------------------------- /docs/assets/icons/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/github.png -------------------------------------------------------------------------------- /docs/assets/icons/in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/in.png -------------------------------------------------------------------------------- /docs/assets/icons/li.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/li.png -------------------------------------------------------------------------------- /docs/assets/icons/p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/p1.png -------------------------------------------------------------------------------- /docs/assets/icons/p3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/p3.png -------------------------------------------------------------------------------- /docs/assets/icons/p6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/p6.png -------------------------------------------------------------------------------- /docs/assets/icons/rev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/rev.png -------------------------------------------------------------------------------- /docs/assets/icons/rev2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/rev2.png -------------------------------------------------------------------------------- /docs/assets/icons/rev3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/rev3.png -------------------------------------------------------------------------------- /docs/assets/icons/slack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/slack.png -------------------------------------------------------------------------------- /docs/assets/icons/tt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/tt.png -------------------------------------------------------------------------------- /docs/assets/icons/tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/tw.png -------------------------------------------------------------------------------- /docs/assets/icons/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/icons/up.png -------------------------------------------------------------------------------- /docs/assets/images/gh_engineer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/images/gh_engineer.jpg -------------------------------------------------------------------------------- /docs/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/images/logo.png -------------------------------------------------------------------------------- /docs/assets/images/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/images/logo.xcf -------------------------------------------------------------------------------- /docs/assets/images/logo_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/images/logo_large.png -------------------------------------------------------------------------------- /docs/assets/images/placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/images/placeholder.jpg -------------------------------------------------------------------------------- /docs/assets/js/contact.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | $(function () { 4 | "use strict"; 5 | 6 | $('#contact-form').validator(); 7 | 8 | $('#contact-form').on('submit', function (e) { 9 | if (!e.isDefaultPrevented()) { 10 | var url = "assets/php/contact.php"; 11 | 12 | $.ajax({ 13 | type: "POST", 14 | url: url, 15 | data: $(this).serialize(), 16 | success: function (data) 17 | { 18 | var messageAlert = 'alert-' + data.type; 19 | var messageText = data.message; 20 | 21 | var alertBox = '
' + messageText + '
'; 22 | if (messageAlert && messageText) { 23 | $('#contact-form').find('.messages').html(alertBox); 24 | $('#contact-form')[0].reset(); 25 | } 26 | } 27 | }); 28 | return false; 29 | } 30 | }) 31 | }); 32 | -------------------------------------------------------------------------------- /docs/assets/js/menu-2.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | var $lateral_menu_trigger = $('.nav-trigger'), 3 | $content_wrapper = $('.main'); 4 | 5 | //open-close lateral menu clicking on the menu icon 6 | $lateral_menu_trigger.on('click', function(event){ 7 | event.preventDefault(); 8 | 9 | $lateral_menu_trigger.toggleClass('is-open'); 10 | $content_wrapper.toggleClass('is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ 11 | // firefox transitions break when parent overflow is changed, so we need to wait for the end of the trasition to give the body an overflow hidden 12 | $('body').toggleClass('overflow-hidden'); 13 | }); 14 | $('.menu-inner').toggleClass('is-open'); 15 | 16 | //check if transitions are not supported - i.e. in IE9 17 | if($('html').hasClass('no-csstransitions')) { 18 | $('body').toggleClass('overflow-hidden'); 19 | } 20 | }); 21 | 22 | //close lateral menu clicking outside the menu itself 23 | $content_wrapper.on('mouseover', function(event){ 24 | if( !$(event.target).is('.nav-trigger, .nav-trigger span') ) { 25 | $lateral_menu_trigger.removeClass('is-open'); 26 | $content_wrapper.removeClass('is-open').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ 27 | $('body').removeClass('overflow-hidden'); 28 | }); 29 | $('.menu-inner').removeClass('is-open'); 30 | //check if transitions are not supported 31 | if($('html').hasClass('no-csstransitions')) { 32 | $('body').removeClass('overflow-hidden'); 33 | } 34 | 35 | } 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /docs/assets/video/cat.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/video/cat.webm -------------------------------------------------------------------------------- /docs/assets/video/coding.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/video/coding.webm -------------------------------------------------------------------------------- /docs/assets/video/placeholder.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/assets/video/placeholder.mp4 -------------------------------------------------------------------------------- /docs/docs/images/design_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/docs/images/design_diagram.png -------------------------------------------------------------------------------- /docs/docs/images/kompose-maven-output-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/docs/images/kompose-maven-output-diagram.png -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/favicon.ico -------------------------------------------------------------------------------- /docs/feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | 5 | 6 | 7 | {{ site.title | xml_escape }} 8 | {{ site.description | xml_escape }} 9 | {{ site.url }}{{ site.baseurl }}/ 10 | 11 | {{ site.time | date_to_rfc822 }} 12 | {{ site.time | date_to_rfc822 }} 13 | Jekyll v{{ jekyll.version }} 14 | {% for doc in site.docs limit:10 %} 15 | 16 | {{ doc.title | xml_escape }} 17 | {{ doc.content | xml_escape }} 18 | {{ doc.date | date_to_rfc822 }} 19 | {{ doc.url | prepend: site.baseurl | prepend: site.url }} 20 | {{ doc.url | prepend: site.baseurl | prepend: site.url }} 21 | 22 | {% endfor %} 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/images/design_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/images/design_diagram.png -------------------------------------------------------------------------------- /docs/images/kompose-maven-output-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/docs/images/kompose-maven-output-diagram.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # Feel free to add content and custom Front Matter to this file. 3 | # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults 4 | 5 | layout: index 6 | --- 7 | 8 | ```sh 9 | $ kompose convert -f compose.yaml 10 | 11 | $ kubectl apply -f . 12 | 13 | $ kubectl get po 14 | NAME READY STATUS RESTARTS AGE 15 | frontend-591253677-5t038 1/1 Running 0 10s 16 | redis-leader-2410703502-9hshf 1/1 Running 0 10s 17 | redis-replica-4049176185-hr1lr 1/1 Running 0 10s 18 | ``` 19 | -------------------------------------------------------------------------------- /examples/compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | redis-leader: 4 | container_name: redis-leader 5 | image: redis 6 | ports: 7 | - "6379" 8 | 9 | redis-replica: 10 | container_name: redis-replica 11 | image: redis 12 | ports: 13 | - "6379" 14 | command: redis-server --replicaof redis-leader 6379 --dir /tmp 15 | 16 | web: 17 | container_name: web 18 | image: quay.io/kompose/web 19 | ports: 20 | - "8080:8080" -------------------------------------------------------------------------------- /examples/web/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.21.2 2 | 3 | # Debugging within the container 4 | RUN apt-get update && apt-get install dnsutils redis-tools -y 5 | 6 | # Set the working directory in the container 7 | WORKDIR /app 8 | 9 | # Copy the entire project which includes the public directory, vendoring, etc. 10 | COPY . . 11 | 12 | # Build your application 13 | RUN CGO_ENABLED=0 GOOS=linux go build -o /frontend 14 | 15 | # Change the permissions so that all users can execute it 16 | RUN chmod +x /frontend 17 | 18 | # Although setting permissions on /frontend should suffice, set wider permissions if needed 19 | RUN chown -R 1001:0 /app && \ 20 | chmod -R g=u /app 21 | 22 | # This directive ensures the container does not run as root 23 | USER 1001 24 | 25 | EXPOSE 8080 26 | CMD ["/frontend"] 27 | -------------------------------------------------------------------------------- /examples/web/README.md: -------------------------------------------------------------------------------- 1 | A fork of https://github.com/kubernetes/examples/blob/master/guestbook-go/README.md 2 | 3 | A simple example that shows the functionality of Kompose 4 | 5 | Pushed to https://docker.io/kompose/web 6 | -------------------------------------------------------------------------------- /examples/web/compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | redis-leader: 4 | container_name: redis-leader 5 | image: redis 6 | ports: 7 | - "6379" 8 | 9 | redis-replica: 10 | container_name: redis-replica 11 | image: redis 12 | ports: 13 | - "6379" 14 | command: redis-server --replicaof redis-leader 6379 15 | 16 | web: 17 | container_name: web 18 | build: ./web 19 | ports: 20 | - "8080:8080" 21 | -------------------------------------------------------------------------------- /examples/web/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/redhat-developer/podman-desktop-demo 2 | 3 | go 1.21.2 4 | 5 | require ( 6 | github.com/codegangsta/negroni v1.0.0 7 | github.com/gorilla/mux v1.8.1 8 | github.com/xyproto/simpleredis/v2 v2.6.5 9 | ) 10 | 11 | require ( 12 | github.com/gomodule/redigo v1.8.9 // indirect 13 | github.com/xyproto/pinterface v1.5.3 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /examples/web/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Kompose Guestbook 9 | 10 | 11 | 15 | 16 |
17 |

Waiting for database connection...

18 |
19 | 20 |
21 |
22 | 23 | Submit 24 |
25 |
26 | 27 |
28 |

29 |

/env 30 | /info

31 |
32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /examples/web/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes/kompose/ae2a394038ccd5b7d4127b4777183fc9402066c7/examples/web/public/logo.png -------------------------------------------------------------------------------- /examples/web/public/style.css: -------------------------------------------------------------------------------- 1 | body, input { 2 | color: #123; 3 | font-family: "Gill Sans", sans-serif; 4 | } 5 | 6 | div { 7 | overflow: hidden; 8 | padding: 1em 0; 9 | position: relative; 10 | text-align: center; 11 | } 12 | 13 | h1, h2, p, input, a { 14 | font-weight: 300; 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | color: #BDB76B; 20 | font-size: 3.5em; 21 | } 22 | 23 | h2 { 24 | color: #999; 25 | } 26 | 27 | form { 28 | margin: 0 auto; 29 | max-width: 50em; 30 | text-align: center; 31 | } 32 | 33 | input { 34 | border: 0; 35 | border-radius: 1000px; 36 | box-shadow: inset 0 0 0 2px #BDB76B; 37 | display: inline; 38 | font-size: 1.5em; 39 | margin-bottom: 1em; 40 | outline: none; 41 | padding: .5em 5%; 42 | width: 55%; 43 | } 44 | 45 | form a { 46 | background: #BDB76B; 47 | border: 0; 48 | border-radius: 1000px; 49 | color: #FFF; 50 | font-size: 1.25em; 51 | font-weight: 400; 52 | padding: .75em 2em; 53 | text-decoration: none; 54 | text-transform: uppercase; 55 | white-space: normal; 56 | } 57 | 58 | p { 59 | font-size: 1.5em; 60 | line-height: 1.5; 61 | } 62 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/codegangsta/negroni/.gitignore: -------------------------------------------------------------------------------- 1 | /coverage.txt 2 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/codegangsta/negroni/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | dist: trusty 5 | 6 | go: 7 | - 1.x 8 | - 1.2.x 9 | - 1.3.x 10 | - 1.4.x 11 | - 1.5.x 12 | - 1.6.x 13 | - 1.7.x 14 | - 1.8.x 15 | - master 16 | 17 | before_install: 18 | - find "${GOPATH%%:*}" -name '*.a' -delete 19 | - rm -rf "${GOPATH%%:*}/src/golang.org" 20 | - go get golang.org/x/tools/cover 21 | - go get golang.org/x/tools/cmd/cover 22 | 23 | script: 24 | - go test -race -coverprofile=coverage.txt -covermode=atomic 25 | 26 | after_success: 27 | - bash <(curl -s "https://codecov.io/bash") 28 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/codegangsta/negroni/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jeremy Saenz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/codegangsta/negroni/doc.go: -------------------------------------------------------------------------------- 1 | // Package negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers. 2 | // 3 | // If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit. 4 | // 5 | // For a full guide visit http://github.com/urfave/negroni 6 | // 7 | // package main 8 | // 9 | // import ( 10 | // "github.com/urfave/negroni" 11 | // "net/http" 12 | // "fmt" 13 | // ) 14 | // 15 | // func main() { 16 | // mux := http.NewServeMux() 17 | // mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { 18 | // fmt.Fprintf(w, "Welcome to the home page!") 19 | // }) 20 | // 21 | // n := negroni.Classic() 22 | // n.UseHandler(mux) 23 | // n.Run(":3000") 24 | // } 25 | package negroni 26 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/codegangsta/negroni/response_writer_pusher.go: -------------------------------------------------------------------------------- 1 | //go:build go1.8 2 | // +build go1.8 3 | 4 | package negroni 5 | 6 | import ( 7 | "fmt" 8 | "net/http" 9 | ) 10 | 11 | func (rw *responseWriter) Push(target string, opts *http.PushOptions) error { 12 | pusher, ok := rw.ResponseWriter.(http.Pusher) 13 | if ok { 14 | return pusher.Push(target, opts) 15 | } 16 | return fmt.Errorf("the ResponseWriter doesn't support the Pusher interface") 17 | } 18 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gomodule/redigo/redis/reflect.go: -------------------------------------------------------------------------------- 1 | package redis 2 | 3 | import ( 4 | "reflect" 5 | "runtime" 6 | ) 7 | 8 | // methodName returns the name of the calling method, 9 | // assumed to be two stack frames above. 10 | func methodName() string { 11 | pc, _, _, _ := runtime.Caller(2) 12 | f := runtime.FuncForPC(pc) 13 | if f == nil { 14 | return "unknown method" 15 | } 16 | return f.Name() 17 | } 18 | 19 | // mustBe panics if f's kind is not expected. 20 | func mustBe(v reflect.Value, expected reflect.Kind) { 21 | if v.Kind() != expected { 22 | panic(&reflect.ValueError{Method: methodName(), Kind: v.Kind()}) 23 | } 24 | } 25 | 26 | // fieldByIndexCreate returns the nested field corresponding 27 | // to index creating elements that are nil when stepping through. 28 | // It panics if v is not a struct. 29 | func fieldByIndexCreate(v reflect.Value, index []int) reflect.Value { 30 | if len(index) == 1 { 31 | return v.Field(index[0]) 32 | } 33 | 34 | mustBe(v, reflect.Struct) 35 | for i, x := range index { 36 | if i > 0 { 37 | if v.Kind() == reflect.Ptr && v.Type().Elem().Kind() == reflect.Struct { 38 | if v.IsNil() { 39 | v.Set(reflect.New(v.Type().Elem())) 40 | } 41 | v = v.Elem() 42 | } 43 | } 44 | v = v.Field(x) 45 | } 46 | 47 | return v 48 | } 49 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gomodule/redigo/redis/reflect_go117.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.18 2 | // +build !go1.18 3 | 4 | package redis 5 | 6 | import ( 7 | "errors" 8 | "reflect" 9 | ) 10 | 11 | // fieldByIndexErr returns the nested field corresponding to index. 12 | // It returns an error if evaluation requires stepping through a nil 13 | // pointer, but panics if it must step through a field that 14 | // is not a struct. 15 | func fieldByIndexErr(v reflect.Value, index []int) (reflect.Value, error) { 16 | if len(index) == 1 { 17 | return v.Field(index[0]), nil 18 | } 19 | 20 | mustBe(v, reflect.Struct) 21 | for i, x := range index { 22 | if i > 0 { 23 | if v.Kind() == reflect.Ptr && v.Type().Elem().Kind() == reflect.Struct { 24 | if v.IsNil() { 25 | return reflect.Value{}, errors.New("reflect: indirection through nil pointer to embedded struct field " + v.Type().Elem().Name()) 26 | } 27 | v = v.Elem() 28 | } 29 | } 30 | v = v.Field(x) 31 | } 32 | 33 | return v, nil 34 | } 35 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gomodule/redigo/redis/reflect_go118.go: -------------------------------------------------------------------------------- 1 | //go:build go1.18 2 | // +build go1.18 3 | 4 | package redis 5 | 6 | import ( 7 | "reflect" 8 | ) 9 | 10 | // fieldByIndexErr returns the nested field corresponding to index. 11 | // It returns an error if evaluation requires stepping through a nil 12 | // pointer, but panics if it must step through a field that 13 | // is not a struct. 14 | func fieldByIndexErr(v reflect.Value, index []int) (reflect.Value, error) { 15 | return v.FieldByIndexErr(index) 16 | } 17 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gorilla/mux/.editorconfig: -------------------------------------------------------------------------------- 1 | ; https://editorconfig.org/ 2 | 3 | root = true 4 | 5 | [*] 6 | insert_final_newline = true 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | indent_style = space 10 | indent_size = 2 11 | 12 | [{Makefile,go.mod,go.sum,*.go,.gitmodules}] 13 | indent_style = tab 14 | indent_size = 4 15 | 16 | [*.md] 17 | indent_size = 4 18 | trim_trailing_whitespace = false 19 | 20 | eclint_indent_style = unset -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gorilla/mux/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.coverprofile 2 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gorilla/mux/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 The Gorilla Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gorilla/mux/Makefile: -------------------------------------------------------------------------------- 1 | GO_LINT=$(shell which golangci-lint 2> /dev/null || echo '') 2 | GO_LINT_URI=github.com/golangci/golangci-lint/cmd/golangci-lint@latest 3 | 4 | GO_SEC=$(shell which gosec 2> /dev/null || echo '') 5 | GO_SEC_URI=github.com/securego/gosec/v2/cmd/gosec@latest 6 | 7 | GO_VULNCHECK=$(shell which govulncheck 2> /dev/null || echo '') 8 | GO_VULNCHECK_URI=golang.org/x/vuln/cmd/govulncheck@latest 9 | 10 | .PHONY: golangci-lint 11 | golangci-lint: 12 | $(if $(GO_LINT), ,go install $(GO_LINT_URI)) 13 | @echo "##### Running golangci-lint" 14 | golangci-lint run -v 15 | 16 | .PHONY: gosec 17 | gosec: 18 | $(if $(GO_SEC), ,go install $(GO_SEC_URI)) 19 | @echo "##### Running gosec" 20 | gosec ./... 21 | 22 | .PHONY: govulncheck 23 | govulncheck: 24 | $(if $(GO_VULNCHECK), ,go install $(GO_VULNCHECK_URI)) 25 | @echo "##### Running govulncheck" 26 | govulncheck ./... 27 | 28 | .PHONY: verify 29 | verify: golangci-lint gosec govulncheck 30 | 31 | .PHONY: test 32 | test: 33 | @echo "##### Running tests" 34 | go test -race -cover -coverprofile=coverage.coverprofile -covermode=atomic -v ./... -------------------------------------------------------------------------------- /examples/web/vendor/github.com/gorilla/mux/test_helpers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Gorilla Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package mux 6 | 7 | import "net/http" 8 | 9 | // SetURLVars sets the URL variables for the given request, to be accessed via 10 | // mux.Vars for testing route behaviour. Arguments are not modified, a shallow 11 | // copy is returned. 12 | // 13 | // This API should only be used for testing purposes; it provides a way to 14 | // inject variables into the request context. Alternatively, URL variables 15 | // can be set by making a route that captures the required variables, 16 | // starting a server and sending the request to that server. 17 | func SetURLVars(r *http.Request, val map[string]string) *http.Request { 18 | return requestWithVars(r, val) 19 | } 20 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/xyproto/pinterface/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/xyproto/pinterface/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.8" 5 | - "1.9" 6 | - "1.10" 7 | - "1.11" 8 | - "1.12" 9 | - "1.13" 10 | - "1.14" 11 | - tip 12 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/xyproto/pinterface/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2021 Alexander F. Rødseth 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/xyproto/pinterface/README.md: -------------------------------------------------------------------------------- 1 | # pinterface 2 | 3 | [![Go Report Card](https://goreportcard.com/badge/github.com/xyproto/pinterface)](https://goreportcard.com/report/github.com/xyproto/pinterface) [![License](https://img.shields.io/badge/license-BSD-green.svg?style=flat)](https://raw.githubusercontent.com/xyproto/pinterface/main/LICENSE) 4 | 5 | Interface types for `simple*` and `permission*` packages. 6 | 7 | Interfaces for: 8 | --------------- 9 | 10 | * Redis: [permissions2](https://github.com/xyproto/permissions2) and [simpleredis](https://github.com/xyproto/simpleredis) 11 | * Bolt: [permissionbolt](https://github.com/xyproto/permissionbolt) and [simplebolt](https://github.com/xyproto/simplebolt) 12 | * MariaDB/MySQL: [permissionsql](https://github.com/xyproto/permissionsql) and [simplemaria](https://github.com/xyproto/simplemaria) 13 | * PostgreSQL: [pstore](https://github.com/xyproto/pstore) and [simplehstore](https://github.com/xyproto/simplehstore) 14 | 15 | [![Packaging status](https://repology.org/badge/vertical-allrepos/go:github-xyproto-pinterface.svg)](https://repology.org/project/go:github-xyproto-pinterface/versions) 16 | 17 | General information 18 | ------------------- 19 | 20 | * Version: 1.5.3 (The tag is `v1.5.3` to work better with `go mod`. The API has version `5.3`.) 21 | * License: BSD-3 22 | * Author: Alexander F. Rødseth <xyproto@archlinux.org> 23 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/xyproto/simpleredis/v2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2023 Alexander F. Rødseth 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | -------------------------------------------------------------------------------- /examples/web/vendor/github.com/xyproto/simpleredis/v2/creator.go: -------------------------------------------------------------------------------- 1 | package simpleredis 2 | 3 | import ( 4 | "github.com/xyproto/pinterface" 5 | ) 6 | 7 | // For implementing pinterface.ICreator 8 | 9 | type RedisCreator struct { 10 | pool *ConnectionPool 11 | dbindex int 12 | } 13 | 14 | func NewCreator(pool *ConnectionPool, dbindex int) *RedisCreator { 15 | return &RedisCreator{pool, dbindex} 16 | } 17 | 18 | func (c *RedisCreator) SelectDatabase(dbindex int) { 19 | c.dbindex = dbindex 20 | } 21 | 22 | func (c *RedisCreator) NewList(id string) (pinterface.IList, error) { 23 | return &List{c.pool, id, c.dbindex}, nil 24 | } 25 | 26 | func (c *RedisCreator) NewSet(id string) (pinterface.ISet, error) { 27 | return &Set{c.pool, id, c.dbindex}, nil 28 | } 29 | 30 | func (c *RedisCreator) NewHashMap(id string) (pinterface.IHashMap, error) { 31 | return &HashMap{c.pool, id, c.dbindex}, nil 32 | } 33 | 34 | func (c *RedisCreator) NewKeyValue(id string) (pinterface.IKeyValue, error) { 35 | return &KeyValue{c.pool, id, c.dbindex}, nil 36 | } 37 | -------------------------------------------------------------------------------- /examples/web/vendor/modules.txt: -------------------------------------------------------------------------------- 1 | # github.com/codegangsta/negroni v1.0.0 2 | ## explicit 3 | github.com/codegangsta/negroni 4 | # github.com/gomodule/redigo v1.8.9 5 | ## explicit; go 1.16 6 | github.com/gomodule/redigo/redis 7 | # github.com/gorilla/mux v1.8.1 8 | ## explicit; go 1.20 9 | github.com/gorilla/mux 10 | # github.com/xyproto/pinterface v1.5.3 11 | ## explicit; go 1.8 12 | github.com/xyproto/pinterface 13 | # github.com/xyproto/simpleredis/v2 v2.6.5 14 | ## explicit; go 1.17 15 | github.com/xyproto/simpleredis/v2 16 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package main 18 | 19 | import ( 20 | "fmt" 21 | "os" 22 | 23 | "github.com/kubernetes/kompose/cmd" 24 | ) 25 | 26 | func main() { 27 | if err := cmd.Execute(); err != nil { 28 | fmt.Fprintln(os.Stderr, err) 29 | os.Exit(1) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /pkg/loader/loader.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package loader 18 | 19 | import ( 20 | "fmt" 21 | 22 | "github.com/kubernetes/kompose/pkg/kobject" 23 | "github.com/kubernetes/kompose/pkg/loader/compose" 24 | ) 25 | 26 | // Loader interface defines loader that loads files and converts it to kobject representation 27 | type Loader interface { 28 | LoadFile(files []string, profiles []string, noInterpolate bool) (kobject.KomposeObject, error) 29 | ///Name() string 30 | } 31 | 32 | // GetLoader returns loader for given format 33 | func GetLoader(format string) (Loader, error) { 34 | if format != "compose" { 35 | return nil, fmt.Errorf("input file format %s is not supported", format) 36 | } 37 | return new(compose.Compose), nil 38 | } 39 | -------------------------------------------------------------------------------- /pkg/testutils/kubernetes.go: -------------------------------------------------------------------------------- 1 | package testutils 2 | 3 | import ( 4 | "errors" 5 | 6 | appsv1 "k8s.io/api/apps/v1" 7 | v1 "k8s.io/api/core/v1" 8 | "k8s.io/apimachinery/pkg/runtime" 9 | ) 10 | 11 | // CheckForHeadless is helper function for tests. 12 | // It checks if all Services in objects are Headless Services and if there is at least one such Services. 13 | func CheckForHeadless(objects []runtime.Object) error { 14 | serviceCreated := false 15 | for _, obj := range objects { 16 | if svc, ok := obj.(*v1.Service); ok { 17 | serviceCreated = true 18 | // Check if it is a headless services 19 | if svc.Spec.ClusterIP != "None" { 20 | return errors.New("this is not a Headless services") 21 | } 22 | } 23 | } 24 | if !serviceCreated { 25 | return errors.New("no Service created") 26 | } 27 | return nil 28 | } 29 | 30 | // CheckForHealthCheckLivenessAndReadiness check if has liveness and readiness in healthcheck configured. 31 | func CheckForHealthCheckLivenessAndReadiness(objects []runtime.Object) error { 32 | serviceCreated := false 33 | for _, obj := range objects { 34 | if deployment, ok := obj.(*appsv1.Deployment); ok { 35 | serviceCreated = true 36 | 37 | // Check if it is a headless services 38 | if deployment.Spec.Template.Spec.Containers[0].ReadinessProbe == nil { 39 | return errors.New("there is not a ReadinessProbe") 40 | } 41 | if deployment.Spec.Template.Spec.Containers[0].LivenessProbe == nil { 42 | return errors.New("there is not a LivenessGate") 43 | } 44 | } 45 | } 46 | if !serviceCreated { 47 | return errors.New("no Service created") 48 | } 49 | return nil 50 | } 51 | -------------------------------------------------------------------------------- /pkg/transformer/transformer.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package transformer 18 | 19 | import ( 20 | "github.com/kubernetes/kompose/pkg/kobject" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | ) 23 | 24 | // Transformer interface defines transformer that is converting kobject to other resources 25 | type Transformer interface { 26 | // Transform converts KomposeObject to transformer specific objects. 27 | Transform(kobject.KomposeObject, kobject.ConvertOptions) ([]runtime.Object, error) 28 | } 29 | -------------------------------------------------------------------------------- /pkg/utils/docker/client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016 The Kubernetes Authors All rights reserved 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package docker 18 | 19 | import ( 20 | "os" 21 | 22 | docker "github.com/fsouza/go-dockerclient" 23 | ) 24 | 25 | // Client connects to Docker client on host 26 | func Client() (*docker.Client, error) { 27 | var ( 28 | err error 29 | client *docker.Client 30 | ) 31 | 32 | dockerHost := os.Getenv("DOCKER_HOST") 33 | 34 | if len(dockerHost) > 0 { 35 | // Create client instance from Docker's environment variables: 36 | // DOCKER_HOST, DOCKER_TLS_VERIFY, DOCKER_CERT_PATH 37 | client, err = docker.NewClientFromEnv() 38 | } else { 39 | // Default unix socket end-point 40 | endpoint := "unix:///var/run/docker.sock" 41 | client, err = docker.NewClient(endpoint) 42 | } 43 | if err != nil { 44 | return client, err 45 | } 46 | 47 | return client, nil 48 | } 49 | -------------------------------------------------------------------------------- /pkg/utils/docker/tag.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016 The Kubernetes Authors All rights reserved 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package docker 18 | 19 | import ( 20 | dockerlib "github.com/fsouza/go-dockerclient" 21 | "github.com/pkg/errors" 22 | log "github.com/sirupsen/logrus" 23 | ) 24 | 25 | // Tag will provide methods for interaction with API regarding tagging images 26 | type Tag struct { 27 | Client dockerlib.Client 28 | } 29 | 30 | // TagImage function is responsible for tagging the docker image 31 | func (c *Tag) TagImage(image Image) error { 32 | options := dockerlib.TagImageOptions{ 33 | Tag: image.Tag, 34 | Repo: image.Repository, 35 | } 36 | 37 | log.Infof("Tagging image '%s' into repository '%s'", image.Name, image.Repository) 38 | err := c.Client.TagImage(image.ShortName, options) 39 | if err != nil { 40 | log.Errorf("Unable to tag image '%s' into repository '%s'. Error: %s", image.Name, image.Registry, err) 41 | return errors.New("unable to tag docker image(s)") 42 | } 43 | 44 | log.Infof("Successfully tagged image '%s'", image.Remote) 45 | return nil 46 | } 47 | -------------------------------------------------------------------------------- /pkg/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | var ( 4 | // VERSION is version number that will be displayed when running ./kompose version 5 | VERSION = "1.36.0" 6 | // GITCOMMIT is hash of the commit that will be displayed when running ./kompose version 7 | // this will be overwritten when running build like this: go build -ldflags="-X github.com/kubernetes/kompose/pkg/version.GITCOMMIT=$(GITCOMMIT)" 8 | // HEAD is default indicating that this was not set during build 9 | GITCOMMIT = "HEAD" 10 | ) 11 | -------------------------------------------------------------------------------- /script/check-gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2017 The Kubernetes Authors All rights reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | # This checks if all go source files in current directory are format using gofmt 19 | 20 | # Ignore vendor directory that's NOT in the main path 21 | GO_FILES=$(find . -path ./vendor -prune -o -name '*.go' -print ) 22 | 23 | for file in $GO_FILES; do 24 | gofmtOutput=$(gofmt -l "$file") 25 | if [ "$gofmtOutput" ]; then 26 | errors+=("$gofmtOutput") 27 | fi 28 | done 29 | 30 | 31 | if [ ${#errors[@]} -eq 0 ]; then 32 | echo "gofmt OK" 33 | else 34 | echo "gofmt ERROR - These files are not formatted by gofmt:" 35 | for err in "${errors[@]}"; do 36 | echo "$err" 37 | done 38 | exit 1 39 | fi -------------------------------------------------------------------------------- /script/manual-docs-sync.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## README: 4 | ## This script is ran by running: 5 | ## cd script 6 | ## ./manual-docs-sync.sh 7 | ## 8 | ## This will take all documentation from the /docs folder of the main dir and push to the gh-pages branch (granted you have access) 9 | 10 | DOCS_REPO_NAME="kompose" 11 | DOCS_REPO_URL="git@github.com:kubernetes/kompose.git" 12 | DOCS_BRANCH="gh-pages" 13 | DOCS_FOLDER="docs" 14 | 15 | # clone the repo 16 | git clone "$DOCS_REPO_URL" "$DOCS_REPO_NAME" 17 | 18 | # change to that directory (to prevent accidental pushing to main, etc.) 19 | cd "$DOCS_REPO_NAME" 20 | 21 | # switch to gh-pages and grab the docs folder from main 22 | git checkout gh-pages 23 | git checkout main -- docs 24 | 25 | # Copy it all over to the current directory 26 | cp -r docs/* . 27 | rm -r docs 28 | 29 | git add --all 30 | 31 | # Check if anything changed, and if it's the case, push to origin/main. 32 | if git commit -m 'Update docs' -m "Synchronize documentation against website" ; then 33 | git push 34 | fi 35 | 36 | # cd back to the original root folder 37 | cd .. 38 | -------------------------------------------------------------------------------- /script/test/README.md: -------------------------------------------------------------------------------- 1 | # Functional Test 2 | 3 | ### Requirements 4 | 5 | Install `jq - commandline JSON processor` with minimum version of 1.5 6 | 7 | 8 | ### Running tests 9 | 10 | Test running ./cmd/tests.sh 11 | 12 | 13 | -------------------------------------------------------------------------------- /script/test/cmd/.coverprofile: -------------------------------------------------------------------------------- 1 | mode: atomic 2 | -------------------------------------------------------------------------------- /script/test/cmd/cmd_test.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "testing" 9 | ) 10 | 11 | var ProjectPath = "$GOPATH/src/github.com/kubernetes/kompose/" 12 | var BinaryLocation = os.ExpandEnv(ProjectPath + "kompose") 13 | 14 | func Test_stdin(t *testing.T) { 15 | if testing.Short() { 16 | t.Skip("skipping test in short mode.") 17 | } 18 | kjson := `{"version": "2","services": {"redis": {"image": "redis:3.0","ports": ["6379"]}}}` 19 | cmdStr := fmt.Sprintf("%s convert --stdout -j -f - <