Code Monkey home page Code Monkey logo

appset-secret-plugin's Introduction

ApplicationSet Secret Plugin Generator

appset-secret-plugin is an Argo CD ApplicationSet Plugin Generator (only available in Argo CD v2.8.0 or newer) to fetch variables from an existing Kubernetes Secret that is mounted as file in our plugin generator deployment.

Usage

First, install Argo CD on your cluster.

Install with helm

For helm, see the README for full details of the allowed values in values.yaml, but this is the gist for testing:

helm repo add appset-secret-plugin https://small-hack.github.io/appset-secret-plugin
helm install my-release-name appset-secret-plugin/appset-secret-plugin

You'll likely want to pass in a value for an existing Kubernetes Secret containing your secret keys you want to be available to the Plugin Generator. To do that, let's say the name of your Kubernetes Secret is my-secret-name, you can try this:

helm install my-release-name appset-secret-plugin/appset-secret-plugin \
   --set secretVars.existingSecret=my-secret-name

Install with Kustomize

See the README in the kustomize directory.

Testing

You can create a Kubernetes Secret for your queriable variables, like this:

apiVersion: v1
kind: Secret
metadata:
  name: argocd-secret-vars
  namespace: argocd
  labels:
    app.kubernetes.io/part-of: argocd
type: stringData
data:
  secret_vars.yaml: |
    app_name: "beepboop"

Here's an example ApplicationSet, using the secret plugin generator, to apply:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: my-application-set
spec:
  goTemplate: true
  goTemplateOptions: ["missingkey=error"]
  generators:
    - plugin:
        configMapRef:
          name: secret-plugin-generator
        input:
          parameters:
            secret_vars: ["app_name"]
  template:
    metadata:
      name: "from-appset-{{.app_name}}"
    spec:
      project: default
      source:
        repoURL: https://github.com/argoproj/argocd-example-apps.git
        path: guestbook
      destination:
        server: https://kubernetes.default.svc
        namespace: default

You can apply the example ApplicationSet and Secret with:

kubectl apply -f example/appset_and_secret.yaml

Status

This is an alpha project still, but I'm working on getting to beta. Please open a GitHub Issue with your method of installation, your distro of k8s and the version of your k8s tooling (kustomize, helm, etc), if you're having any trouble.

appset-secret-plugin's People

Contributors

cloudymax avatar jessebot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

crenshaw-dev

appset-secret-plugin's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: File contents are invalid JSON but parse using JSON5. Support for this will be removed in a future release so please change to a support .json5 file name or ensure correct JSON syntax.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
docker/Dockerfile
  • python 3.12-slim-bookworm
github-actions
.github/workflows/cd-helm-release.yml
  • actions/checkout v4
  • azure/setup-helm v3.5
  • helm/chart-releaser-action v1.6.0
.github/workflows/ci-helm-lint-test.yml
  • actions/checkout v4
  • azure/setup-helm v3.5
  • helm/chart-testing-action v2.6.1
  • helm/kind-action v1.10.0
.github/workflows/docker-push-daily.yml
  • actions/checkout v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/build-push-action v5
helm-values
charts/appset-secret-plugin/values.yaml
pep621
docker/pyproject.toml
pip_requirements
docker/requirements.txt
poetry
docker/pyproject.toml
  • python ^3.11
  • PyYAML ^6.0.1
regex
charts/appset-secret-plugin/Chart.yaml
  • jessebot/argocd-appset-secret-plugin v0.4.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.