{"id":21050691,"url":"https://github.com/sandcastle/gcloud-helm","last_synced_at":"2025-03-13T23:14:13.153Z","repository":{"id":66956488,"uuid":"142670416","full_name":"sandcastle/gcloud-helm","owner":"sandcastle","description":"A container with Google Cloud SDK, Helm, kubectl and a few lightweight helpers.","archived":false,"fork":false,"pushed_at":"2021-03-21T20:27:51.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T18:34:58.739Z","etag":null,"topics":["gcloud","gsutil","helm","kubectl","kubectx","kubernetes-cli"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/sandcastle/gcloud-helm/tags/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandcastle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-28T11:00:17.000Z","updated_at":"2021-03-21T20:27:53.000Z","dependencies_parsed_at":"2023-02-28T02:45:34.222Z","dependency_job_id":null,"html_url":"https://github.com/sandcastle/gcloud-helm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandcastle%2Fgcloud-helm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandcastle%2Fgcloud-helm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandcastle%2Fgcloud-helm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandcastle%2Fgcloud-helm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandcastle","download_url":"https://codeload.github.com/sandcastle/gcloud-helm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495495,"owners_count":20299923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcloud","gsutil","helm","kubectl","kubectx","kubernetes-cli"],"created_at":"2024-11-19T15:46:59.768Z","updated_at":"2025-03-13T23:14:13.135Z","avatar_url":"https://github.com/sandcastle.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gcloud-helm\n\n\u003e A container with [Google Cloud SDK](https://cloud.google.com/sdk/), [Helm](https://helm.sh/), [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and a few lightweight helpers.\n\n## Getting started\n\n_Pulling the container:_\n\n```sh\ndocker pull sandcastle/gcloud-helm:latest\n```\n\n## Example usage with Gitlab\n\n_An example of how it can be used with gitlab deployments to gcloud:_\n\n```yaml\ndeploy-staging:\n  image: sandcastle/gcloud-helm:latest\n  stage: staging\n  environment:\n    name: staging\n    url: https://staging.sandcastle.io/\n  when: manual\n  variables:\n    GCLOUD_KEY_FILE: /tmp/gcloud-api-key.json\n    KUBE_NAMESPACE: staging\n    HELM_NAME: helloworld\n  before_script:\n    - echo ${GCLOUD_API_KEYFILE} | base64 -d \u003e ${GCLOUD_KEY_FILE}\n    # use of the gcloud cli\n    - gcloud auth activate-service-account --key-file ${GCLOUD_KEY_FILE}\n    - gcloud beta container clusters get-credentials ${GCLOUD_CLUSTER}\n      --region ${GCLOUD_REGION}\n      --project ${GCLOUD_PROJECT}\n    # use of the kubetool\n    - kubetool ns set ${KUBE_NAMESPACE}\n    # init of the helm client\n    - helm init --client-only\n  script:\n    - helm upgrade --install ${HELM_NAME}\n      --namespace \"${KUBE_NAMESPACE}\"\n      --values ./kube/helloworld/values.yaml\n      --set \"ingress.domain=staging.sandcastle.io\"\n      --set \"image.tag=latest\"\n      ./kube/helloworld\n```\n\n## Kubetool\n\n\u003e A lightweight (no deps) kubectl wrapper for working with contexts and namespaces,\n\u003e heavily inspired by the awesome [kubectx](https://github.com/ahmetb/kubectx)\n\n#### Commands\n\nThis tool makes the composition of common `kubectl` operations in build\nscripts a lot easier.\n\nThe following commands are available:\n\n```\nkubetool                    : show this message\nkubetool ctx get            : gets the current context\nkubetool ctx set NAME       : sets the current context\nkubetool ctx ls,list        : lists all of the contexts\nkubetool ctx rename OLD NEW : renames a context from the old value to the new valud\nkubetool ns get             : get the current namespace for the current context\nkubetool ns set NAME        : set the current namespace for the current context\nkubetool ns ls,list         : list all namespaces for the current context\nkubetool -h,--help          : show this message\n```\n\n#### Example\n\nWithout the `kubetool` things like setting the namespace for the current\ncontext take too much boilerplate:\n\n```sh\nKUBE_CTX=\"$(kubectl config current-context)\"\nkubectl config use-context \"${1}\" --namespace=\"${MY_NAMESPACE}\"\n```\n\nWith the `kubetool`:\n\n```sh\nkubetool ns set \"${MY_NAMESPACE}\"\n```\n\n## Contributing\n\nPR's are more than welcome!\n\n:beers: Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandcastle%2Fgcloud-helm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandcastle%2Fgcloud-helm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandcastle%2Fgcloud-helm/lists"}