kubes 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.dockerignore +4 -0
 - data/CHANGELOG.md +3 -0
 - data/Dockerfile +14 -0
 - data/docs/_docs/ci/cloudbuild.md +69 -0
 - data/docs/_includes/sidebar.html +5 -0
 - data/lib/kubes/compiler/shared/helpers.rb +2 -1
 - data/lib/kubes/version.rb +1 -1
 - metadata +5 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8d2e75bd0d156b889fcbd5a55389d335e4509e2c27bc667940bfd87155b3d9a0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f13237e1d8fa442d2b1a1ed07d7e209b3054cf3cdfee8f68dab20e3358352add
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: '09576784450fc73c4846f7803c375542de5ed1f37bda86cd8cd8e61cf53dfa774192b8648d9b207180b9681a4e787ea0ade6211d02eedcd63a11051c694bb0a1'
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 13219946a970eb6e476902b09971ae832b47a8cddf0ebc73ab68a079de2d7a67e50a539b8784731d67cf5037c677c811408db6e3cbb8b7eea528bec5588784a4
         
     | 
    
        data/.dockerignore
    ADDED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -3,6 +3,9 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            All notable changes to this project will be documented in this file.
         
     | 
| 
       4 
4 
     | 
    
         
             
            This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
      
 6 
     | 
    
         
            +
            ## [0.2.4]
         
     | 
| 
      
 7 
     | 
    
         
            +
            - #16 google cloudbuild support & docs: add Dockerfile for kubes as a docker entrypoint
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       6 
9 
     | 
    
         
             
            ## [0.2.3]
         
     | 
| 
       7 
10 
     | 
    
         
             
            - #15 use kubernetes default deployment strategy instead
         
     | 
| 
       8 
11 
     | 
    
         | 
    
        data/Dockerfile
    ADDED
    
    | 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            FROM ruby:2.7-alpine
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            RUN apk add --no-cache docker
         
     | 
| 
      
 4 
     | 
    
         
            +
            RUN apk add --no-cache build-base ruby ruby-dev
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            RUN wget https://storage.googleapis.com/kubernetes-release/release/v1.18.6/bin/linux/amd64/kubectl
         
     | 
| 
      
 7 
     | 
    
         
            +
            RUN chmod u+x kubectl && mv kubectl /bin/kubectl
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            WORKDIR /app
         
     | 
| 
      
 10 
     | 
    
         
            +
            ADD . /app
         
     | 
| 
      
 11 
     | 
    
         
            +
            RUN bundle install
         
     | 
| 
      
 12 
     | 
    
         
            +
            RUN rake install
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            ENTRYPOINT ["/usr/local/bundle/bin/kubes"]
         
     | 
| 
         @@ -0,0 +1,69 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            title: CloudBuild
         
     | 
| 
      
 3 
     | 
    
         
            +
            ---
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            To build kubes as a Docker image entrypoint for [Google CloudBuild Custom Builder](https://cloud.google.com/cloud-build/docs/configuring-builds/use-community-and-custom-builders).
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                git clone http://github.com/boltops-tools/kubes
         
     | 
| 
      
 8 
     | 
    
         
            +
                cd kubes
         
     | 
| 
      
 9 
     | 
    
         
            +
                gcloud builds submit --tag gcr.io/$GOOGLE_PROJECT/kubes
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            Be sure to set GOOGLE_PROJECT to your own project id.
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            ## Example Codebuild YAML
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            cloudbuild.yaml:
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            ```yaml
         
     | 
| 
      
 18 
     | 
    
         
            +
            steps:
         
     | 
| 
      
 19 
     | 
    
         
            +
            # Simply calling kubectl version with the CLOUDSDK_* vars will auth to the GKE cluster. Unsure why.
         
     | 
| 
      
 20 
     | 
    
         
            +
            - name: gcr.io/cloud-builders/kubectl
         
     | 
| 
      
 21 
     | 
    
         
            +
              args: ['version']
         
     | 
| 
      
 22 
     | 
    
         
            +
              env:
         
     | 
| 
      
 23 
     | 
    
         
            +
              - 'CLOUDSDK_COMPUTE_REGION=$_GCP_REGION'
         
     | 
| 
      
 24 
     | 
    
         
            +
              - 'CLOUDSDK_CONTAINER_CLUSTER=$_GKE_CLUSTER'
         
     | 
| 
      
 25 
     | 
    
         
            +
            - name: 'gcr.io/$PROJECT_ID/kubes'
         
     | 
| 
      
 26 
     | 
    
         
            +
              args: ["deploy"]
         
     | 
| 
      
 27 
     | 
    
         
            +
              env:
         
     | 
| 
      
 28 
     | 
    
         
            +
              - 'GOOGLE_PROJECT=$PROJECT_ID' # .kubes/config.rb: config.repo
         
     | 
| 
      
 29 
     | 
    
         
            +
              - 'KUBES_ENV=$_KUBES_ENV'
         
     | 
| 
      
 30 
     | 
    
         
            +
              - 'KUBES_EXTRA=$_KUBES_EXTRA'
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            substitutions:
         
     | 
| 
      
 33 
     | 
    
         
            +
              _GCP_REGION: us-central1
         
     | 
| 
      
 34 
     | 
    
         
            +
              _GKE_CLUSTER: dev-cluster
         
     | 
| 
      
 35 
     | 
    
         
            +
              _KUBES_ENV: dev
         
     | 
| 
      
 36 
     | 
    
         
            +
              _KUBES_EXTRA: ''
         
     | 
| 
      
 37 
     | 
    
         
            +
            options:
         
     | 
| 
      
 38 
     | 
    
         
            +
                substitution_option: 'ALLOW_LOOSE'
         
     | 
| 
      
 39 
     | 
    
         
            +
            ```
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            ## Run CloudBuild
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            Run cloudbuild with:
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                gcloud builds submit --config cloudbuild.yaml
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            Example with output:
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                $ gcloud builds submit --config cloudbuild.yaml
         
     | 
| 
      
 50 
     | 
    
         
            +
                Starting Step #1
         
     | 
| 
      
 51 
     | 
    
         
            +
                Step #1: => docker build -t gcr.io/tung-275700/demo:kubes-2020-07-25T21-13-59 -f Dockerfile .
         
     | 
| 
      
 52 
     | 
    
         
            +
                Step #1: Pushed gcr.io/tung-275700/demo:kubes-2020-07-25T21-13-59 docker image.
         
     | 
| 
      
 53 
     | 
    
         
            +
                Step #1: Docker push took 2s.
         
     | 
| 
      
 54 
     | 
    
         
            +
                Step #1: Compiled  .kubes/resources files to .kubes/output
         
     | 
| 
      
 55 
     | 
    
         
            +
                Step #1: Deploying kubes resources
         
     | 
| 
      
 56 
     | 
    
         
            +
                Step #1: => kubectl apply -f .kubes/output/shared/namespace.yaml
         
     | 
| 
      
 57 
     | 
    
         
            +
                Step #1: namespace/demo unchanged
         
     | 
| 
      
 58 
     | 
    
         
            +
                Step #1: => kubectl apply -f .kubes/output/web/service.yaml
         
     | 
| 
      
 59 
     | 
    
         
            +
                Step #1: service/web unchanged
         
     | 
| 
      
 60 
     | 
    
         
            +
                Step #1: => kubectl apply -f .kubes/output/web/deployment.yaml
         
     | 
| 
      
 61 
     | 
    
         
            +
                Step #1: deployment.apps/web configured
         
     | 
| 
      
 62 
     | 
    
         
            +
                $
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
            ## Create Extra Environments
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
            If you are using the [with_extra helper]({% link _docs/extra-env.md %}), you can create additional environments of the same app like so:
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                gcloud builds submit --config cloudbuild.yaml --substitutions=_KUBES_EXTRA=2
         
     | 
| 
      
 69 
     | 
    
         
            +
                gcloud builds submit --config cloudbuild.yaml --substitutions=_KUBES_EXTRA=3
         
     | 
    
        data/docs/_includes/sidebar.html
    CHANGED
    
    | 
         @@ -93,6 +93,11 @@ 
     | 
|
| 
       93 
93 
     | 
    
         
             
                  </li>
         
     | 
| 
       94 
94 
     | 
    
         
             
                  <li><a href="{% link _docs/kustomize.md %}">Kustomize Support</a></li>
         
     | 
| 
       95 
95 
     | 
    
         
             
                  <li><a href="{% link _docs/auto-context.md %}">Auto Context</a></li>
         
     | 
| 
      
 96 
     | 
    
         
            +
                  <li>CI/CD
         
     | 
| 
      
 97 
     | 
    
         
            +
                    <ul>
         
     | 
| 
      
 98 
     | 
    
         
            +
                      <li><a href="{% link _docs/ci/cloudbuild.md %}">CloudBuild</a></li>
         
     | 
| 
      
 99 
     | 
    
         
            +
                    </ul>
         
     | 
| 
      
 100 
     | 
    
         
            +
                  </li>
         
     | 
| 
       96 
101 
     | 
    
         
             
                  <li>More
         
     | 
| 
       97 
102 
     | 
    
         
             
                    <ul class="more">
         
     | 
| 
       98 
103 
     | 
    
         
             
                      <li><a href="{% link support.md %}">Support</a></li>
         
     | 
    
        data/lib/kubes/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: kubes
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Tung Nguyen
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020-07- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-07-26 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     | 
| 
         @@ -214,9 +214,11 @@ executables: 
     | 
|
| 
       214 
214 
     | 
    
         
             
            extensions: []
         
     | 
| 
       215 
215 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       216 
216 
     | 
    
         
             
            files:
         
     | 
| 
      
 217 
     | 
    
         
            +
            - ".dockerignore"
         
     | 
| 
       217 
218 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
       218 
219 
     | 
    
         
             
            - ".rspec"
         
     | 
| 
       219 
220 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
      
 221 
     | 
    
         
            +
            - Dockerfile
         
     | 
| 
       220 
222 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       221 
223 
     | 
    
         
             
            - Guardfile
         
     | 
| 
       222 
224 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
         @@ -231,6 +233,7 @@ files: 
     | 
|
| 
       231 
233 
     | 
    
         
             
            - docs/Rakefile
         
     | 
| 
       232 
234 
     | 
    
         
             
            - docs/_config.yml
         
     | 
| 
       233 
235 
     | 
    
         
             
            - docs/_docs/auto-context.md
         
     | 
| 
      
 236 
     | 
    
         
            +
            - docs/_docs/ci/cloudbuild.md
         
     | 
| 
       234 
237 
     | 
    
         
             
            - docs/_docs/config.md
         
     | 
| 
       235 
238 
     | 
    
         
             
            - docs/_docs/config/docker.md
         
     | 
| 
       236 
239 
     | 
    
         
             
            - docs/_docs/config/env.md
         
     |