Code Monkey home page Code Monkey logo

cephfs-provisioner-example's Introduction

Prerequisites

  • Install kustomize:

    mkdir -p ~/bin
    curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.0.1/kustomize_v4.0.1_linux_amd64.tar.gz |
      tar -C ~/bin -xzf -
    
  • Install sops:

    mkdir -p ~/bin
    curl -L -o ~/bin/sops https://github.com/mozilla/sops/releases/download/v3.6.1/sops-v3.6.1.linux
    chmod 755 ~/bin/sops
    
  • Install KSOPS:

    plugindir=~/.config/kustomize/plugin/viaduct.ai/v1/ksops
    mkdir -p $plugindir
    curl -L https://github.com/viaduct-ai/kustomize-sops/releases/download/v2.4.0/ksops_2.4.0_Linux_x86_64.tar.gz |
      tar -C $plugindir -xzf -
    

Usage

To render YAML to stdout:

kustomize build --enable-alpha-plugins

To create (or update) resources in OpenShift:

kustomize build --enable-alpha-plugins | oc apply -f-

Theory of operation

The kustomize command reads kustomizations.yml and renders on stdout resources declared in the resources key. It will add a namespace key to the resources using the value declared in the namespace key.

The generators section declares resources that are generated dynamically. The secret-generator.yml file instructs kustomize to generate resources from ceph-admin-secret.yaml andf ceph-client-secret.yaml using the viaduct.ai/v1/ksops plugin. kustomize will look for plugins in subdirectories of ~/.config/kustomize/plugin (where it will find the ksops plugin you installed from the Prerequisities section).

The KSOPS plugin uses sops to decrypt the named files. The sops command will decrypt encrypted keys using GPG. When encrypting files, it will encrypt data to the keys declared in .sops.yaml.

To edit an encrypted file:

sops <filename>

To decrypt a file to stdout:

sops -d <filename>

cephfs-provisioner-example's People

Contributors

larsks avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.