Giter Club home page Giter Club logo

gcs-copy's Introduction

gcs-copy

gcs-copy is a simple binary that copies files from one location in a gcs bucket to another It facilitates providing a public static version of your chartmuseum server via direct public gcs bucket access

Installing

You will need to generate a service account JSON key for your cluster and store that as a secret in Kubernetes Then you can provision gcs-copy as a cronjob with something like this:

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: gcs-copy
spec:
  schedule: "*/1 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: gcs-copy
            image: i0nw/gcs-copy:0.0.1
            command: ["gcs-copy"]
            env:
            - name: BUCKET_NAME
              value: "jenkinsx-chartmuseum"
            - name: COPY_FROM
              value: "charts/index-cache.yaml"
            - name: COPY_TO
              value: "index.yaml"
            - name: GOOGLE_APPLICATION_CREDENTIALS
              value: "/gcs-service-key/i0ntest.key.json"
            volumeMounts:
            - name: gcs-service-key
              mountPath: /gcs-service-key
              readOnly: true
          volumes:
          - name: gcs-service-key
            secret:
              secretName: gcs-jenkinsx-chartmuseum
          restartPolicy: OnFailure

You will need to adjust your chartmuseum server settings to prefix the "charts" directory and use gcs as storage. Now whenever you hit the api to upload a chart simply run helm repo update afterwards to force a recreation of the index-cache.yaml You now have a highly available (serverless) public endpoint to serve your helm charts from!

gcs-copy's People

Contributors

i0n avatar

Watchers

James Strachan avatar Gareth Evans avatar Adam Papai avatar James Cloos avatar James Rawlings avatar

Forkers

garethjevans

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.