kubes 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +15 -7
- data/.rspec +3 -0
- data/CHANGELOG.md +10 -0
- data/Gemfile +3 -1
- data/Guardfile +19 -0
- data/LICENSE.txt +201 -0
- data/README.md +46 -18
- data/Rakefile +13 -1
- data/docs/.gitignore +5 -0
- data/docs/CNAME +1 -0
- data/docs/Gemfile +16 -0
- data/docs/LICENSE +201 -0
- data/docs/Procfile +2 -0
- data/docs/README.md +24 -0
- data/docs/Rakefile +38 -0
- data/docs/_config.yml +71 -0
- data/docs/_docs/auto-context.md +47 -0
- data/docs/_docs/config.md +9 -0
- data/docs/_docs/config/docker.md +70 -0
- data/docs/_docs/config/env.md +58 -0
- data/docs/_docs/config/kubectl.md +61 -0
- data/docs/_docs/contributing.md +98 -0
- data/docs/_docs/dsl.md +66 -0
- data/docs/_docs/dsl/multiple-resources.md +114 -0
- data/docs/_docs/dsl/resources.md +12 -0
- data/docs/_docs/dsl/resources/backend_config.md +45 -0
- data/docs/_docs/dsl/resources/config_map.md +84 -0
- data/docs/_docs/dsl/resources/daemon_set.md +58 -0
- data/docs/_docs/dsl/resources/deployment.md +142 -0
- data/docs/_docs/dsl/resources/generic.md +58 -0
- data/docs/_docs/dsl/resources/ingress.md +103 -0
- data/docs/_docs/dsl/resources/managed_certificate.md +39 -0
- data/docs/_docs/dsl/resources/namespace.md +34 -0
- data/docs/_docs/dsl/resources/network_policy.md +45 -0
- data/docs/_docs/dsl/resources/pod.md +82 -0
- data/docs/_docs/dsl/resources/role.md +44 -0
- data/docs/_docs/dsl/resources/role_binding.md +55 -0
- data/docs/_docs/dsl/resources/secret.md +87 -0
- data/docs/_docs/dsl/resources/service.md +60 -0
- data/docs/_docs/dsl/resources/service_account.md +37 -0
- data/docs/_docs/extra-env.md +23 -0
- data/docs/_docs/extra-env/dsl.md +86 -0
- data/docs/_docs/extra-env/yaml.md +67 -0
- data/docs/_docs/helpers.md +18 -0
- data/docs/_docs/intro.md +15 -0
- data/docs/_docs/intro/concepts.md +37 -0
- data/docs/_docs/intro/how-kubes-works.md +29 -0
- data/docs/_docs/intro/install.md +6 -0
- data/docs/_docs/intro/ordering.md +63 -0
- data/docs/_docs/intro/ordering/custom.md +25 -0
- data/docs/_docs/intro/structure.md +43 -0
- data/docs/_docs/kustomize.md +54 -0
- data/docs/_docs/layering.md +8 -0
- data/docs/_docs/layering/dsl.md +5 -0
- data/docs/_docs/layering/merge.md +96 -0
- data/docs/_docs/layering/yaml.md +5 -0
- data/docs/_docs/learn/dsl.md +5 -0
- data/docs/_docs/learn/dsl/change.md +16 -0
- data/docs/_docs/learn/dsl/cluster.md +5 -0
- data/docs/_docs/learn/dsl/delete.md +30 -0
- data/docs/_docs/learn/dsl/deploy.md +61 -0
- data/docs/_docs/learn/dsl/install.md +5 -0
- data/docs/_docs/learn/dsl/new-project.md +33 -0
- data/docs/_docs/learn/dsl/next-steps.md +5 -0
- data/docs/_docs/learn/dsl/review-project.md +52 -0
- data/docs/_docs/learn/dsl/update.md +53 -0
- data/docs/_docs/learn/yaml.md +5 -0
- data/docs/_docs/learn/yaml/change.md +17 -0
- data/docs/_docs/learn/yaml/cluster.md +5 -0
- data/docs/_docs/learn/yaml/delete.md +30 -0
- data/docs/_docs/learn/yaml/deploy.md +62 -0
- data/docs/_docs/learn/yaml/install.md +5 -0
- data/docs/_docs/learn/yaml/new-project.md +36 -0
- data/docs/_docs/learn/yaml/next-steps.md +5 -0
- data/docs/_docs/learn/yaml/review-project.md +97 -0
- data/docs/_docs/learn/yaml/update.md +54 -0
- data/docs/_docs/next-steps.md +13 -0
- data/docs/_docs/patterns.md +7 -0
- data/docs/_docs/patterns/clock-web-worker.md +71 -0
- data/docs/_docs/resources.md +11 -0
- data/docs/_docs/resources/base.md +33 -0
- data/docs/_docs/resources/role.md +41 -0
- data/docs/_docs/resources/shared.md +36 -0
- data/docs/_docs/yaml.md +46 -0
- data/docs/_includes/commands.html +131 -0
- data/docs/_includes/content.html +25 -0
- data/docs/_includes/dsl/methods.md +1 -0
- data/docs/_includes/dsl/rolling_deployment.md +1 -0
- data/docs/_includes/dsl/suffix_hash.md +8 -0
- data/docs/_includes/example.html +12 -0
- data/docs/_includes/footer.html +37 -0
- data/docs/_includes/google_analytics.html +10 -0
- data/docs/_includes/header.html +31 -0
- data/docs/_includes/intro/install.md +15 -0
- data/docs/_includes/js.html +3 -0
- data/docs/_includes/kubes-steps.md +3 -0
- data/docs/_includes/layering/layers.md +64 -0
- data/docs/_includes/learn/cluster.md +22 -0
- data/docs/_includes/learn/next-steps.md +6 -0
- data/docs/_includes/learn/review.md +25 -0
- data/docs/_includes/learn/start.md +3 -0
- data/docs/_includes/reference.md +3 -0
- data/docs/_includes/sidebar.html +113 -0
- data/docs/_layouts/default.html +35 -0
- data/docs/_reference/kubes-apply.md +24 -0
- data/docs/_reference/kubes-clean.md +22 -0
- data/docs/_reference/kubes-compile.md +22 -0
- data/docs/_reference/kubes-completion.md +42 -0
- data/docs/_reference/kubes-completion_script.md +25 -0
- data/docs/_reference/kubes-delete.md +23 -0
- data/docs/_reference/kubes-deploy.md +35 -0
- data/docs/_reference/kubes-docker-build.md +20 -0
- data/docs/_reference/kubes-docker-help.md +15 -0
- data/docs/_reference/kubes-docker-push.md +20 -0
- data/docs/_reference/kubes-docker.md +25 -0
- data/docs/_reference/kubes-init.md +26 -0
- data/docs/_reference/kubes-version.md +21 -0
- data/docs/_sass/bootstrap-overrides.scss +17 -0
- data/docs/_sass/buttons.scss +62 -0
- data/docs/_sass/caret.scss +39 -0
- data/docs/_sass/content.scss +21 -0
- data/docs/_sass/cta.scss +39 -0
- data/docs/_sass/default.scss +103 -0
- data/docs/_sass/footer.scss +66 -0
- data/docs/_sass/masthead.scss +77 -0
- data/docs/_sass/mixins.scss +79 -0
- data/docs/_sass/sidebar.scss +107 -0
- data/docs/_sass/syntax.scss +89 -0
- data/docs/_sass/table.scss +30 -0
- data/docs/_sass/theme.scss +292 -0
- data/docs/_sass/variables.scss +24 -0
- data/docs/bin/build +4 -0
- data/docs/bin/rerun +2 -0
- data/docs/bin/web +8 -0
- data/docs/css/main.scss +24 -0
- data/docs/docs.md +7 -0
- data/docs/getting-started.md +12 -0
- data/docs/img/logos/boltops-logo-full.png +0 -0
- data/docs/img/logos/boltops-logo.png +0 -0
- data/docs/img/logos/filler-logo.png +0 -0
- data/docs/img/logos/kubes-black.png +0 -0
- data/docs/img/logos/kubes-sign.png +0 -0
- data/docs/index.html +34 -0
- data/docs/js/app.js +39414 -0
- data/docs/opal/app.rb +16 -0
- data/docs/opal/pager.rb +90 -0
- data/docs/opal/sidebar.rb +94 -0
- data/docs/opal/sidebar/expander.rb +51 -0
- data/docs/reference.md +15 -0
- data/docs/support.md +19 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.css +3719 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.min.css +7 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.min.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.css +331 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.min.css +8 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.min.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap.css +10038 -0
- data/docs/vendor/bootstrap/css/bootstrap.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap.min.css +7 -0
- data/docs/vendor/bootstrap/css/bootstrap.min.css.map +1 -0
- data/docs/vendor/bootstrap/js/bootstrap.bundle.js +7013 -0
- data/docs/vendor/bootstrap/js/bootstrap.bundle.js.map +1 -0
- data/docs/vendor/bootstrap/js/bootstrap.bundle.min.js +7 -0
- data/docs/vendor/bootstrap/js/bootstrap.bundle.min.js.map +1 -0
- data/docs/vendor/bootstrap/js/bootstrap.js +4435 -0
- data/docs/vendor/bootstrap/js/bootstrap.js.map +1 -0
- data/docs/vendor/bootstrap/js/bootstrap.min.js +7 -0
- data/docs/vendor/bootstrap/js/bootstrap.min.js.map +1 -0
- data/docs/vendor/font-awesome/css/font-awesome.css +2337 -0
- data/docs/vendor/font-awesome/css/font-awesome.min.css +4 -0
- data/docs/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.svg +2671 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/docs/vendor/font-awesome/less/animated.less +34 -0
- data/docs/vendor/font-awesome/less/bordered-pulled.less +25 -0
- data/docs/vendor/font-awesome/less/core.less +12 -0
- data/docs/vendor/font-awesome/less/fixed-width.less +6 -0
- data/docs/vendor/font-awesome/less/font-awesome.less +18 -0
- data/docs/vendor/font-awesome/less/icons.less +789 -0
- data/docs/vendor/font-awesome/less/larger.less +13 -0
- data/docs/vendor/font-awesome/less/list.less +19 -0
- data/docs/vendor/font-awesome/less/mixins.less +60 -0
- data/docs/vendor/font-awesome/less/path.less +15 -0
- data/docs/vendor/font-awesome/less/rotated-flipped.less +20 -0
- data/docs/vendor/font-awesome/less/screen-reader.less +5 -0
- data/docs/vendor/font-awesome/less/stacked.less +20 -0
- data/docs/vendor/font-awesome/less/variables.less +799 -0
- data/docs/vendor/font-awesome/scss/_animated.scss +34 -0
- data/docs/vendor/font-awesome/scss/_bordered-pulled.scss +25 -0
- data/docs/vendor/font-awesome/scss/_core.scss +12 -0
- data/docs/vendor/font-awesome/scss/_fixed-width.scss +6 -0
- data/docs/vendor/font-awesome/scss/_icons.scss +789 -0
- data/docs/vendor/font-awesome/scss/_larger.scss +13 -0
- data/docs/vendor/font-awesome/scss/_list.scss +19 -0
- data/docs/vendor/font-awesome/scss/_mixins.scss +60 -0
- data/docs/vendor/font-awesome/scss/_path.scss +15 -0
- data/docs/vendor/font-awesome/scss/_rotated-flipped.scss +20 -0
- data/docs/vendor/font-awesome/scss/_screen-reader.scss +5 -0
- data/docs/vendor/font-awesome/scss/_stacked.scss +20 -0
- data/docs/vendor/font-awesome/scss/_variables.scss +799 -0
- data/docs/vendor/font-awesome/scss/font-awesome.scss +18 -0
- data/docs/vendor/jquery/jquery.js +10598 -0
- data/docs/vendor/jquery/jquery.min.js +2 -0
- data/docs/vendor/jquery/jquery.min.map +1 -0
- data/docs/vendor/jquery/jquery.slim.js +8495 -0
- data/docs/vendor/jquery/jquery.slim.min.js +2 -0
- data/docs/vendor/jquery/jquery.slim.min.map +1 -0
- data/docs/vendor/simple-line-icons/css/simple-line-icons.css +778 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.eot +0 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.svg +200 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.ttf +0 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.woff +0 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.woff2 +0 -0
- data/docs/vendor/simple-line-icons/less/simple-line-icons.less +982 -0
- data/docs/vendor/simple-line-icons/scss/simple-line-icons.scss +979 -0
- data/exe/kubes +14 -0
- data/kubes.gemspec +29 -19
- data/lib/kubes.rb +21 -1
- data/lib/kubes/args/custom.rb +30 -0
- data/lib/kubes/args/dsl.rb +14 -0
- data/lib/kubes/auth.rb +21 -0
- data/lib/kubes/auth/ecr.rb +55 -0
- data/lib/kubes/autoloader.rb +21 -0
- data/lib/kubes/aws_services.rb +14 -0
- data/lib/kubes/cli.rb +93 -0
- data/lib/kubes/cli/apply.rb +9 -0
- data/lib/kubes/cli/base.rb +9 -0
- data/lib/kubes/cli/build.rb +8 -0
- data/lib/kubes/cli/clean.rb +9 -0
- data/lib/kubes/cli/compile.rb +8 -0
- data/lib/kubes/cli/delete.rb +11 -0
- data/lib/kubes/cli/deploy.rb +13 -0
- data/lib/kubes/cli/describe.rb +8 -0
- data/lib/kubes/cli/docker.rb +20 -0
- data/lib/kubes/cli/get.rb +8 -0
- data/lib/kubes/cli/help.rb +11 -0
- data/lib/kubes/cli/help/completion.md +20 -0
- data/lib/kubes/cli/help/completion_script.md +3 -0
- data/lib/kubes/cli/help/deploy.md +10 -0
- data/lib/kubes/cli/init.rb +69 -0
- data/lib/kubes/cli/sequence.rb +27 -0
- data/lib/kubes/command.rb +100 -0
- data/lib/kubes/compiler.rb +71 -0
- data/lib/kubes/compiler/decorator.rb +17 -0
- data/lib/kubes/compiler/decorator/base.rb +16 -0
- data/lib/kubes/compiler/decorator/compile.rb +12 -0
- data/lib/kubes/compiler/decorator/resources/base.rb +13 -0
- data/lib/kubes/compiler/decorator/resources/container.rb +76 -0
- data/lib/kubes/compiler/decorator/resources/container/mapping.rb +28 -0
- data/lib/kubes/compiler/decorator/resources/deployment.rb +10 -0
- data/lib/kubes/compiler/decorator/resources/pod.rb +10 -0
- data/lib/kubes/compiler/decorator/resources/secret.rb +23 -0
- data/lib/kubes/compiler/decorator/write.rb +14 -0
- data/lib/kubes/compiler/dsl/core/base.rb +27 -0
- data/lib/kubes/compiler/dsl/core/blocks.rb +55 -0
- data/lib/kubes/compiler/dsl/core/fields.rb +78 -0
- data/lib/kubes/compiler/dsl/core/files.rb +28 -0
- data/lib/kubes/compiler/dsl/core/helpers.rb +4 -0
- data/lib/kubes/compiler/dsl/core/parser.rb +43 -0
- data/lib/kubes/compiler/dsl/syntax/backend_config.rb +10 -0
- data/lib/kubes/compiler/dsl/syntax/cluster_role.rb +4 -0
- data/lib/kubes/compiler/dsl/syntax/cluster_role_binding.rb +4 -0
- data/lib/kubes/compiler/dsl/syntax/config_map.rb +20 -0
- data/lib/kubes/compiler/dsl/syntax/daemon_set.rb +23 -0
- data/lib/kubes/compiler/dsl/syntax/deployment.rb +163 -0
- data/lib/kubes/compiler/dsl/syntax/ingress.rb +41 -0
- data/lib/kubes/compiler/dsl/syntax/managed_certificate.rb +18 -0
- data/lib/kubes/compiler/dsl/syntax/namespace.rb +13 -0
- data/lib/kubes/compiler/dsl/syntax/network_policy.rb +30 -0
- data/lib/kubes/compiler/dsl/syntax/pod.rb +81 -0
- data/lib/kubes/compiler/dsl/syntax/resource.rb +70 -0
- data/lib/kubes/compiler/dsl/syntax/role.rb +40 -0
- data/lib/kubes/compiler/dsl/syntax/role_binding.rb +43 -0
- data/lib/kubes/compiler/dsl/syntax/secret.rb +22 -0
- data/lib/kubes/compiler/dsl/syntax/service.rb +68 -0
- data/lib/kubes/compiler/dsl/syntax/service_account.rb +20 -0
- data/lib/kubes/compiler/layering.rb +39 -0
- data/lib/kubes/compiler/shared/helpers.rb +30 -0
- data/lib/kubes/compiler/strategy.rb +27 -0
- data/lib/kubes/compiler/strategy/base.rb +13 -0
- data/lib/kubes/compiler/strategy/dsl.rb +32 -0
- data/lib/kubes/compiler/strategy/erb.rb +42 -0
- data/lib/kubes/compiler/strategy/pass.rb +9 -0
- data/lib/kubes/compiler/strategy/result.rb +26 -0
- data/lib/kubes/compiler/util/normalize.rb +11 -0
- data/lib/kubes/compiler/util/yaml_dump.rb +23 -0
- data/lib/kubes/completer.rb +159 -0
- data/lib/kubes/completer/script.rb +6 -0
- data/lib/kubes/completer/script.sh +10 -0
- data/lib/kubes/config.rb +82 -0
- data/lib/kubes/core.rb +32 -0
- data/lib/kubes/docker/args/default.rb +39 -0
- data/lib/kubes/docker/base.rb +88 -0
- data/lib/kubes/docker/build.rb +33 -0
- data/lib/kubes/docker/push.rb +33 -0
- data/lib/kubes/hooks/builder.rb +41 -0
- data/lib/kubes/hooks/dsl.rb +19 -0
- data/lib/kubes/kubectl.rb +87 -0
- data/lib/kubes/kubectl/args/base.rb +12 -0
- data/lib/kubes/kubectl/args/kustomize.rb +28 -0
- data/lib/kubes/kubectl/args/standard.rb +32 -0
- data/lib/kubes/kubectl/batch.rb +49 -0
- data/lib/kubes/kubectl/decider.rb +15 -0
- data/lib/kubes/kubectl/kustomize.rb +13 -0
- data/lib/kubes/kubectl/ordering.rb +27 -0
- data/lib/kubes/logger.rb +26 -0
- data/lib/kubes/logging.rb +7 -0
- data/lib/kubes/util/consider.rb +9 -0
- data/lib/kubes/util/sh.rb +43 -0
- data/lib/kubes/util/sure.rb +17 -0
- data/lib/kubes/util/time.rb +14 -0
- data/lib/kubes/version.rb +1 -1
- data/lib/templates/base/.kubes/config.rb.tt +9 -0
- data/lib/templates/base/.kubes/config/env/dev.rb +6 -0
- data/lib/templates/base/.kubes/config/env/prod.rb +6 -0
- data/lib/templates/docker/Dockerfile +4 -0
- data/lib/templates/dsl/.kubes/resources/base/all.rb.tt +2 -0
- data/lib/templates/dsl/.kubes/resources/web/deployment.rb.tt +7 -0
- data/lib/templates/dsl/.kubes/resources/web/deployment/dev.rb +1 -0
- data/lib/templates/dsl/.kubes/resources/web/deployment/prod.rb +1 -0
- data/lib/templates/dsl/.kubes/resources/web/service.rb.tt +8 -0
- data/lib/templates/yaml/.kubes/resources/base/all.yaml.tt +2 -0
- data/lib/templates/yaml/.kubes/resources/base/deployment.yaml.tt +11 -0
- data/lib/templates/yaml/.kubes/resources/web/deployment.yaml.tt +24 -0
- data/lib/templates/yaml/.kubes/resources/web/deployment/dev.yaml +2 -0
- data/lib/templates/yaml/.kubes/resources/web/deployment/prod.yaml +2 -0
- data/lib/templates/yaml/.kubes/resources/web/service.yaml.tt +14 -0
- data/spec/cli_spec.rb +8 -0
- data/spec/fixtures/artifacts/demo-web/deployment.yaml +26 -0
- data/spec/fixtures/artifacts/demo-web/service.yaml +16 -0
- data/spec/fixtures/blocks/deployments.rb +9 -0
- data/spec/fixtures/decorators/deployment/configMap/envFrom.yaml +27 -0
- data/spec/fixtures/decorators/deployment/configMap/valueFrom.yaml +30 -0
- data/spec/fixtures/decorators/deployment/configMap/volumes.yaml +34 -0
- data/spec/fixtures/decorators/deployment/secret/envFrom.yaml +27 -0
- data/spec/fixtures/decorators/deployment/secret/valueFrom.yaml +30 -0
- data/spec/fixtures/decorators/deployment/secret/volumes.yaml +34 -0
- data/spec/fixtures/decorators/pod/configMap/envFrom.yaml +12 -0
- data/spec/fixtures/decorators/pod/configMap/valueFrom.yaml +16 -0
- data/spec/fixtures/decorators/pod/configMap/volumes.yaml +19 -0
- data/spec/fixtures/decorators/pod/secret/envFrom.yaml +12 -0
- data/spec/fixtures/decorators/pod/secret/valueFrom.yaml +16 -0
- data/spec/fixtures/decorators/pod/secret/volumes.yaml +19 -0
- data/spec/fixtures/deployments/minimum.rb +5 -0
- data/spec/fixtures/deployments/props.rb +7 -0
- data/spec/fixtures/deployments/setter/container.rb +11 -0
- data/spec/fixtures/deployments/setter/containers.rb +14 -0
- data/spec/fixtures/deployments/setter/metadata.rb +15 -0
- data/spec/fixtures/deployments/setter/sidecar.rb +12 -0
- data/spec/fixtures/deployments/setter/spec.rb +10 -0
- data/spec/fixtures/multiple-files/deployment-1.rb +4 -0
- data/spec/fixtures/multiple-files/deployment-2.rb +4 -0
- data/spec/fixtures/project/.gitignore +1 -0
- data/spec/fixtures/project/.kubes/resources/deployment.rb +32 -0
- data/spec/fixtures/project/.kubes/resources/foobar.rb +0 -0
- data/spec/fixtures/project/.kubes/resources/service.rb +3 -0
- data/spec/fixtures/services/minimum.rb +3 -0
- data/spec/fixtures/syntax/network_policy.rb +3 -0
- data/spec/fixtures/syntax/pod.rb +1 -0
- data/spec/kubes/compiler/decorator/resources/deployment_spec.rb +92 -0
- data/spec/kubes/compiler/decorator/resources/pod_spec.rb +92 -0
- data/spec/kubes/compiler/strategy/dsl_spec.rb +36 -0
- data/spec/kubes/compiler_spec.rb +10 -0
- data/spec/kubes/dsl/daemon_set.rb +11 -0
- data/spec/kubes/dsl/deployment_spec.rb +60 -0
- data/spec/kubes/dsl/network_policy_spec.rb +14 -0
- data/spec/kubes/dsl/pod_spec.rb +11 -0
- data/spec/kubes/dsl/service_spec.rb +12 -0
- data/spec/kubes/kubectl/batch_spec.rb +24 -0
- data/spec/spec_helper.rb +34 -0
- metadata +602 -22
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f1705ea4877f8147699b06f43bd7e4e265c45f8ce289d3f54b724b9ca304325c
|
4
|
+
data.tar.gz: 6473d29cf54233c203af7daec2b78d3128e7b80d78cf739af4705e9a77f8033a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aec944078d5b6987b4b8c0f91ef4cd11cd512d2b7f6c007465b93b190c95af55bf4dcf4843d1295ae0ea08bf4b46e8db72cc5bd2bc70dfa7e2db1fd15cfd540e
|
7
|
+
data.tar.gz: bd470be829eb4545563e6dca41a01a9122f9e045bcbfb462267bd68f6316329f61a02e46b7fd17b9fb3bed7379589c99fc0f47a569a53aae5a2b639886d1cd00
|
data/.gitignore
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
-
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.bundle
|
4
|
+
/.config
|
2
5
|
/.yardoc
|
3
|
-
/
|
4
|
-
/
|
5
|
-
/coverage/
|
6
|
+
/_yardoc
|
7
|
+
/coverage
|
6
8
|
/doc/
|
7
|
-
/
|
8
|
-
/
|
9
|
-
/
|
9
|
+
/Gemfile.lock
|
10
|
+
/InstalledFiles
|
11
|
+
/lib/bundler/man
|
12
|
+
/pkg
|
13
|
+
/rdoc
|
14
|
+
/spec/reports
|
15
|
+
/test/tmp
|
16
|
+
/test/version_tmp
|
17
|
+
/tmp
|
data/.rspec
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/Guardfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
guard "bundler", cmd: "bundle" do
|
2
|
+
watch("Gemfile")
|
3
|
+
watch(/^.+\.gemspec/)
|
4
|
+
end
|
5
|
+
|
6
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
7
|
+
require "guard/rspec/dsl"
|
8
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
9
|
+
|
10
|
+
# RSpec files
|
11
|
+
rspec = dsl.rspec
|
12
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
13
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
14
|
+
watch(rspec.spec_files)
|
15
|
+
|
16
|
+
# Ruby files
|
17
|
+
ruby = dsl.ruby
|
18
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
19
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/README.md
CHANGED
@@ -1,35 +1,63 @@
|
|
1
1
|
# Kubes
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/kubes.png)](http://badge.fury.io/rb/kubes)
|
4
4
|
|
5
|
-
|
5
|
+
[![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
7
|
+
Kubernetes Deployment Tool: build docker image, compile Kubernetes YAML files, and apply them.
|
10
8
|
|
11
|
-
|
12
|
-
gem 'kubes'
|
13
|
-
```
|
9
|
+
Official Docs Site: [kubes.guru](https://kubes.guru)
|
14
10
|
|
15
|
-
|
11
|
+
Kubes will:
|
16
12
|
|
17
|
-
|
13
|
+
1. Build the docker image and push it to repo
|
14
|
+
2. Compile Kubernetes YAML files from YAML/ERB or a DSL and adjusts the Docker build image
|
15
|
+
3. Deploy via kubectl apply on the compiled Kubernetes YAML files
|
18
16
|
|
19
|
-
|
17
|
+
Features:
|
20
18
|
|
21
|
-
|
19
|
+
* Automation: [Builds the Docker image](docs/docker.md) and updates the compiled YAML files
|
20
|
+
* Syntactic Sugar: Use an optional [ERB/YAML](docs/yaml.md) or [DSL](docs/dsl.md) to write your Kubernetes YAML files. You can use a mix of DSL and YAML definitions in the `.kubes/resources` folder.
|
21
|
+
* Layering: Use the same Kubernetes YAML to build multiple environments like dev and prod with [layering](docs/layering.md).
|
22
|
+
* CLI Customizations: You can customize the [cli args](docs/kubectl.md). You can also run hooks before and after kubectl commands.
|
22
23
|
|
23
24
|
## Usage
|
24
25
|
|
25
|
-
|
26
|
+
kubes init # creates .kubes structure
|
27
|
+
# edit the .kubes/resources files to your needs
|
28
|
+
kubes deploy
|
29
|
+
|
30
|
+
## How It Works
|
31
|
+
|
32
|
+
Kubes is pretty straightforward. Kubes first builds the Docker image and compiles Kubernetes YAML files. Then it merely calls `kubectl`.
|
33
|
+
|
34
|
+
In fact, you can use Kubes to build the files first, and then run `kubectl` directly. Example:
|
35
|
+
|
36
|
+
kubes docker build
|
37
|
+
kubes docker push
|
38
|
+
kubes compile # compiles the .kubes/resources files to .kubes/output
|
39
|
+
|
40
|
+
Now, use `kubectl` directly. This will apply all the files:
|
26
41
|
|
27
|
-
|
42
|
+
kubectl apply --recursive -f .kubes/output
|
28
43
|
|
29
|
-
|
44
|
+
You can also selectively apply specific files:
|
45
|
+
|
46
|
+
kubectl apply -f .kubes/output/web/deployment.yaml
|
47
|
+
kubectl apply -f .kubes/output/web/service.yaml
|
48
|
+
|
49
|
+
You can also apply with kubes. This will compile the automatically files also.
|
50
|
+
|
51
|
+
kubes apply
|
52
|
+
|
53
|
+
The deploy command, does all 3 steps: builds the docker image, compiles the `.kubes/resources` files, and runs kubectl apply.
|
54
|
+
|
55
|
+
kubes deploy
|
56
|
+
|
57
|
+
## Installation
|
30
58
|
|
31
|
-
|
59
|
+
Install with:
|
32
60
|
|
33
|
-
|
61
|
+
gem install kubes
|
34
62
|
|
35
|
-
|
63
|
+
For more info: [kubes.guru](https://kubes.guru)
|
data/Rakefile
CHANGED
@@ -1,2 +1,14 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
|
4
|
+
task default: :spec
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new
|
7
|
+
|
8
|
+
require_relative "lib/kubes"
|
9
|
+
require "cli_markdown"
|
10
|
+
desc "Generates cli reference docs as markdown"
|
11
|
+
task :docs do
|
12
|
+
mkdir_p "docs/_includes"
|
13
|
+
CliMarkdown::Creator.create_all(cli_class: Kubes::CLI, cli_name: "kubes")
|
14
|
+
end
|
data/docs/.gitignore
ADDED
data/docs/CNAME
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
kubes.guru
|
data/docs/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gem "html-proofer"
|
4
|
+
gem "jekyll"
|
5
|
+
gem "opal"
|
6
|
+
gem "opal-browser"
|
7
|
+
gem "opal-jquery"
|
8
|
+
gem "rake"
|
9
|
+
gem "rerun"
|
10
|
+
|
11
|
+
# GitHub pages does not support this plugin.
|
12
|
+
# GitHub pages will not serve zipped assets even if we precompress them before hand.
|
13
|
+
# Leaving comment as a note:
|
14
|
+
# group :jekyll_plugins do
|
15
|
+
# gem 'jekyll-gzip'
|
16
|
+
# end
|
data/docs/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|