|
|
@@ -0,0 +1,1424 @@
|
|
|
+
|
|
|
+<!doctype html>
|
|
|
+<html lang="en" class="no-js">
|
|
|
+ <head>
|
|
|
+
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <link rel="icon" href="../assets/images/favicon.png">
|
|
|
+ <meta name="generator" content="mkdocs-1.1, mkdocs-material-7.1.8">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <title>GitOps using FluxCD - External Secrets Operator</title>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <link rel="stylesheet" href="../assets/stylesheets/main.ca7ac06f.min.css">
|
|
|
+
|
|
|
+
|
|
|
+ <link rel="stylesheet" href="../assets/stylesheets/palette.f1a3b89f.min.css">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
|
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
|
|
|
+ <style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</style>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-QP38TD8K7V"),document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof location$&&location$.subscribe(function(t){gtag("config","G-QP38TD8K7V",{page_path:t.pathname})})})</script>
|
|
|
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-QP38TD8K7V"></script>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </head>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none">
|
|
|
+
|
|
|
+
|
|
|
+ <script>function __prefix(e){return new URL("..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
|
|
|
+
|
|
|
+ <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
|
|
+ <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
|
|
+ <label class="md-overlay" for="__drawer"></label>
|
|
|
+ <div data-md-component="skip">
|
|
|
+
|
|
|
+
|
|
|
+ <a href="#gitops-using-fluxcd-v2" class="md-skip">
|
|
|
+ Skip to content
|
|
|
+ </a>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div data-md-component="announce">
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <header class="md-header" data-md-component="header">
|
|
|
+ <nav class="md-header__inner md-grid" aria-label="Header">
|
|
|
+ <a href=".." title="External Secrets Operator" class="md-header__button md-logo" aria-label="External Secrets Operator" data-md-component="logo">
|
|
|
+
|
|
|
+
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
|
|
+
|
|
|
+ </a>
|
|
|
+ <label class="md-header__button md-icon" for="__drawer">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
|
|
|
+ </label>
|
|
|
+ <div class="md-header__title" data-md-component="header-title">
|
|
|
+ <div class="md-header__ellipsis">
|
|
|
+ <div class="md-header__topic">
|
|
|
+ <span class="md-ellipsis">
|
|
|
+ External Secrets Operator
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="md-header__topic" data-md-component="header-topic">
|
|
|
+ <span class="md-ellipsis">
|
|
|
+
|
|
|
+ GitOps using FluxCD
|
|
|
+
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <label class="md-header__button md-icon" for="__search">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
|
|
+ </label>
|
|
|
+
|
|
|
+<div class="md-search" data-md-component="search" role="dialog">
|
|
|
+ <label class="md-search__overlay" for="__search"></label>
|
|
|
+ <div class="md-search__inner" role="search">
|
|
|
+ <form class="md-search__form" name="search">
|
|
|
+ <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
|
|
|
+ <label class="md-search__icon md-icon" for="__search">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
|
|
+ </label>
|
|
|
+ <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
|
|
|
+ </button>
|
|
|
+ </form>
|
|
|
+ <div class="md-search__output">
|
|
|
+ <div class="md-search__scrollwrap" data-md-scrollfix>
|
|
|
+ <div class="md-search-result" data-md-component="search-result">
|
|
|
+ <div class="md-search-result__meta">
|
|
|
+ Initializing search
|
|
|
+ </div>
|
|
|
+ <ol class="md-search-result__list"></ol>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="md-header__source">
|
|
|
+
|
|
|
+<a href="https://github.com/external-secrets/external-secrets/" title="Go to repository" class="md-source" data-md-component="source">
|
|
|
+ <div class="md-source__icon md-icon">
|
|
|
+
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
|
|
+ </div>
|
|
|
+ <div class="md-source__repository">
|
|
|
+ External Secrets Operator
|
|
|
+ </div>
|
|
|
+</a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </nav>
|
|
|
+</header>
|
|
|
+
|
|
|
+ <div class="md-container" data-md-component="container">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <main class="md-main" data-md-component="main">
|
|
|
+ <div class="md-main__inner md-grid">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
|
|
|
+ <div class="md-sidebar__scrollwrap">
|
|
|
+ <div class="md-sidebar__inner">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
|
|
+ <label class="md-nav__title" for="__drawer">
|
|
|
+ <a href=".." title="External Secrets Operator" class="md-nav__button md-logo" aria-label="External Secrets Operator" data-md-component="logo">
|
|
|
+
|
|
|
+
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
|
|
+
|
|
|
+ </a>
|
|
|
+ External Secrets Operator
|
|
|
+ </label>
|
|
|
+
|
|
|
+ <div class="md-nav__source">
|
|
|
+
|
|
|
+<a href="https://github.com/external-secrets/external-secrets/" title="Go to repository" class="md-source" data-md-component="source">
|
|
|
+ <div class="md-source__icon md-icon">
|
|
|
+
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
|
|
+ </div>
|
|
|
+ <div class="md-source__repository">
|
|
|
+ External Secrets Operator
|
|
|
+ </div>
|
|
|
+</a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href=".." class="md-nav__link">
|
|
|
+ Introduction
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../api-overview/" class="md-nav__link">
|
|
|
+ Overview
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_3">
|
|
|
+ API Types
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="API Types" data-md-level="1">
|
|
|
+ <label class="md-nav__title" for="__nav_3">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ API Types
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../api-externalsecret/" class="md-nav__link">
|
|
|
+ ExternalSecret
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../api-secretstore/" class="md-nav__link">
|
|
|
+ SecretStore
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../api-clustersecretstore/" class="md-nav__link">
|
|
|
+ ClusterSecretStore
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked>
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_4">
|
|
|
+ Guides
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Guides" data-md-level="1">
|
|
|
+ <label class="md-nav__title" for="__nav_4">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Guides
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-introduction/" class="md-nav__link">
|
|
|
+ Introduction
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-getting-started/" class="md-nav__link">
|
|
|
+ Getting started
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-templating/" class="md-nav__link">
|
|
|
+ Advanced Templating
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-all-keys-one-secret/" class="md-nav__link">
|
|
|
+ All keys, One secret
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-common-k8s-secret-types/" class="md-nav__link">
|
|
|
+ Common K8S Secret Types
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-multi-tenancy/" class="md-nav__link">
|
|
|
+ Multi Tenancy
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-metrics/" class="md-nav__link">
|
|
|
+ Metrics
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-using-latest-image/" class="md-nav__link">
|
|
|
+ Using Latest Image
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--active">
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <label class="md-nav__link md-nav__link--active" for="__toc">
|
|
|
+ GitOps using FluxCD
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+
|
|
|
+ <a href="./" class="md-nav__link md-nav__link--active">
|
|
|
+ GitOps using FluxCD
|
|
|
+ </a>
|
|
|
+
|
|
|
+
|
|
|
+<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <label class="md-nav__title" for="__toc">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Table of contents
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#advantages" class="md-nav__link">
|
|
|
+ Advantages
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#the-approach" class="md-nav__link">
|
|
|
+ The approach
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#the-problem" class="md-nav__link">
|
|
|
+ The problem
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#the-solution" class="md-nav__link">
|
|
|
+ The solution
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#create-the-main-kustomization" class="md-nav__link">
|
|
|
+ Create the main kustomization
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#create-the-secret" class="md-nav__link">
|
|
|
+ Create the secret
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#creating-the-references-to-repositories" class="md-nav__link">
|
|
|
+ Creating the references to repositories
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#deploy-the-crds" class="md-nav__link">
|
|
|
+ Deploy the CRDs
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#deploy-the-operator" class="md-nav__link">
|
|
|
+ Deploy the operator
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#deploy-the-crs" class="md-nav__link">
|
|
|
+ Deploy the CRs
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#results" class="md-nav__link">
|
|
|
+ Results
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ </ul>
|
|
|
+
|
|
|
+</nav>
|
|
|
+
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5">
|
|
|
+ Provider
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Provider" data-md-level="1">
|
|
|
+ <label class="md-nav__title" for="__nav_5">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Provider
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_1" type="checkbox" id="__nav_5_1" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5_1">
|
|
|
+ AWS
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="AWS" data-md-level="2">
|
|
|
+ <label class="md-nav__title" for="__nav_5_1">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ AWS
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-aws-secrets-manager/" class="md-nav__link">
|
|
|
+ Secrets Manager
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-aws-parameter-store/" class="md-nav__link">
|
|
|
+ Parameter Store
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_2" type="checkbox" id="__nav_5_2" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5_2">
|
|
|
+ Azure
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Azure" data-md-level="2">
|
|
|
+ <label class="md-nav__title" for="__nav_5_2">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Azure
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-azure-key-vault/" class="md-nav__link">
|
|
|
+ Key Vault
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_3" type="checkbox" id="__nav_5_3" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5_3">
|
|
|
+ Google
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Google" data-md-level="2">
|
|
|
+ <label class="md-nav__title" for="__nav_5_3">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Google
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-google-secrets-manager/" class="md-nav__link">
|
|
|
+ Secrets Manager
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_4" type="checkbox" id="__nav_5_4" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5_4">
|
|
|
+ IBM
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="IBM" data-md-level="2">
|
|
|
+ <label class="md-nav__title" for="__nav_5_4">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ IBM
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-ibm-secrets-manager/" class="md-nav__link">
|
|
|
+ Secrets Manager
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-akeyless/" class="md-nav__link">
|
|
|
+ Akeyless
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-hashicorp-vault/" class="md-nav__link">
|
|
|
+ HashiCorp Vault
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_7" type="checkbox" id="__nav_5_7" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5_7">
|
|
|
+ Yandex
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Yandex" data-md-level="2">
|
|
|
+ <label class="md-nav__title" for="__nav_5_7">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Yandex
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-yandex-lockbox/" class="md-nav__link">
|
|
|
+ Lockbox
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_8" type="checkbox" id="__nav_5_8" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5_8">
|
|
|
+ Gitlab
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Gitlab" data-md-level="2">
|
|
|
+ <label class="md-nav__title" for="__nav_5_8">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Gitlab
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-gitlab-project-variables/" class="md-nav__link">
|
|
|
+ Gitlab Project Variables
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_9" type="checkbox" id="__nav_5_9" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_5_9">
|
|
|
+ Oracle
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Oracle" data-md-level="2">
|
|
|
+ <label class="md-nav__title" for="__nav_5_9">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Oracle
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../provider-oracle-vault/" class="md-nav__link">
|
|
|
+ Oracle Vault
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_6">
|
|
|
+ References
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="References" data-md-level="1">
|
|
|
+ <label class="md-nav__title" for="__nav_6">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ References
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../spec/" class="md-nav__link">
|
|
|
+ API specification
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item md-nav__item--nested">
|
|
|
+
|
|
|
+
|
|
|
+ <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" >
|
|
|
+
|
|
|
+ <label class="md-nav__link" for="__nav_7">
|
|
|
+ Contributing
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ </label>
|
|
|
+ <nav class="md-nav" aria-label="Contributing" data-md-level="1">
|
|
|
+ <label class="md-nav__title" for="__nav_7">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Contributing
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-scrollfix>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../contributing-devguide/" class="md-nav__link">
|
|
|
+ Developer guide
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../contributing-process/" class="md-nav__link">
|
|
|
+ Contributing Process
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../contributing-coc/" class="md-nav__link">
|
|
|
+ Code of Conduct
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../deprecation-policy/" class="md-nav__link">
|
|
|
+ Deprecation Policy
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+</nav>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
|
|
|
+ <div class="md-sidebar__scrollwrap">
|
|
|
+ <div class="md-sidebar__inner">
|
|
|
+
|
|
|
+<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <label class="md-nav__title" for="__toc">
|
|
|
+ <span class="md-nav__icon md-icon"></span>
|
|
|
+ Table of contents
|
|
|
+ </label>
|
|
|
+ <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#advantages" class="md-nav__link">
|
|
|
+ Advantages
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#the-approach" class="md-nav__link">
|
|
|
+ The approach
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#the-problem" class="md-nav__link">
|
|
|
+ The problem
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#the-solution" class="md-nav__link">
|
|
|
+ The solution
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#create-the-main-kustomization" class="md-nav__link">
|
|
|
+ Create the main kustomization
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#create-the-secret" class="md-nav__link">
|
|
|
+ Create the secret
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#creating-the-references-to-repositories" class="md-nav__link">
|
|
|
+ Creating the references to repositories
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#deploy-the-crds" class="md-nav__link">
|
|
|
+ Deploy the CRDs
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#deploy-the-operator" class="md-nav__link">
|
|
|
+ Deploy the operator
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#deploy-the-crs" class="md-nav__link">
|
|
|
+ Deploy the CRs
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="#results" class="md-nav__link">
|
|
|
+ Results
|
|
|
+ </a>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+ </ul>
|
|
|
+
|
|
|
+</nav>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="md-content" data-md-component="content">
|
|
|
+ <article class="md-content__inner md-typeset">
|
|
|
+
|
|
|
+
|
|
|
+ <a href="https://github.com/external-secrets/external-secrets/edit/master/docs/guides-gitops-using-fluxcd.md" title="Edit this page" class="md-content__button md-icon">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
|
|
|
+ </a>
|
|
|
+
|
|
|
+
|
|
|
+ <h1 id="gitops-using-fluxcd-v2">GitOps using FluxCD (v2)</h1>
|
|
|
+<p>FluxCD is a GitOps operator for Kubernetes. It synchronizes the status of the cluster from manifests allocated in
|
|
|
+different repositories (Git or Helm). This approach fits perfectly with External Secrets on clusters which are dynamically
|
|
|
+created, to get credentials with no manual intervention from the beginning.</p>
|
|
|
+<h2 id="advantages">Advantages</h2>
|
|
|
+<p>This approach has several advantages as follows:</p>
|
|
|
+<ul>
|
|
|
+<li><strong>Homogenize environments</strong> allowing developers to use the same toolset in Kind in the same way they do in the cloud
|
|
|
+ provider distributions such as EKS or GKE. This accelerates the development</li>
|
|
|
+<li><strong>Reduce security risks</strong>, because credentials can be easily obtained, so temptation to store them locally is reduced.</li>
|
|
|
+<li><strong>Application compatibility increase</strong>: Applications are deployed in different ways, and sometimes they need to share
|
|
|
+ credentials. This can be done using External Secrets as a wire for them at real time.</li>
|
|
|
+<li><strong>Automation by default</strong> oh, come on!</li>
|
|
|
+</ul>
|
|
|
+<h2 id="the-approach">The approach</h2>
|
|
|
+<p>FluxCD is composed by several controllers dedicated to manage different custom resources. The most important
|
|
|
+ones are <strong>Kustomization</strong> (to clarify, Flux one, not Kubernetes' one) and <strong>HelmRelease</strong> to deploy using the approaches
|
|
|
+of the same names.</p>
|
|
|
+<p>External Secrets can be deployed using Helm <a href="../guides-getting-started/">as explained here</a>. The deployment includes the
|
|
|
+CRDs if enabled on the <code>values.yaml</code>, but after this, you need to deploy some <code>SecretStore</code> to start
|
|
|
+getting credentials from your secrets manager with External Secrets.</p>
|
|
|
+<blockquote>
|
|
|
+<p>The idea of this guide is to deploy the whole stack, using flux, needed by developers not to worry about the credentials,
|
|
|
+but only about the application and its code.</p>
|
|
|
+</blockquote>
|
|
|
+<h2 id="the-problem">The problem</h2>
|
|
|
+<p>This can sound easy, but External Secrets is deployed using Helm, which is managed by the HelmController,
|
|
|
+and your custom resources, for example a <code>ClusterSecretStore</code> and the related <code>Secret</code>, are often deployed using a
|
|
|
+<code>kustomization.yaml</code>, which is deployed by the KustomizeController.</p>
|
|
|
+<p>Both controllers manage the resources independently, at different moments, with no possibility to wait each other.
|
|
|
+This means that we have a wonderful race condition where sometimes the CRs (<code>SecretStore</code>,<code>ClusterSecretStore</code>...) tries
|
|
|
+to be deployed before than the CRDs needed to recognize them.</p>
|
|
|
+<h2 id="the-solution">The solution</h2>
|
|
|
+<p>Let's see the conditions to start working on a solution:</p>
|
|
|
+<ul>
|
|
|
+<li>The External Secrets operator is deployed with Helm, and admits disabling the CRDs deployment</li>
|
|
|
+<li>The race condition only affects the deployment of <code>CustomResourceDefinition</code> and the CRs needed later</li>
|
|
|
+<li>CRDs can be deployed directly from the Git repository of the project using a Flux <code>Kustomization</code></li>
|
|
|
+<li>Required CRs can be deployed using a Flux <code>Kustomization</code> too, allowing dependency between CRDs and CRs</li>
|
|
|
+<li>All previous manifests can be applied with a Kubernetes <code>kustomization</code></li>
|
|
|
+</ul>
|
|
|
+<h2 id="create-the-main-kustomization">Create the main kustomization</h2>
|
|
|
+<p>To have a better view of things needed later, the first manifest to be created is the <code>kustomization.yaml</code></p>
|
|
|
+<div class="highlight"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">kustomize.config.k8s.io/v1beta1</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Kustomization</span>
|
|
|
+
|
|
|
+<span class="nt">resources</span><span class="p">:</span>
|
|
|
+<span class="c1"># Deploy the Vault access secret</span>
|
|
|
+<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">namespace.yaml</span>
|
|
|
+<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">secret-token.yaml</span>
|
|
|
+
|
|
|
+<span class="c1"># Deploy the repositories</span>
|
|
|
+<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">repositories.yaml</span>
|
|
|
+
|
|
|
+<span class="c1"># Deploy the CRDs</span>
|
|
|
+<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">deployment-crds.yaml</span>
|
|
|
+
|
|
|
+<span class="c1"># Deploy the operator</span>
|
|
|
+<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">deployment.yaml</span>
|
|
|
+
|
|
|
+<span class="c1"># Deploy default Custom Resources from 'crs' directory</span>
|
|
|
+<span class="c1"># INFO: This depends on the CRDs deployment. Will happen after it</span>
|
|
|
+<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">deployment-crs.yaml</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<h2 id="create-the-secret">Create the secret</h2>
|
|
|
+<p>To access your secret manager, External Secrets needs some credentials. They are stored inside a Secret, which is intended
|
|
|
+to be deployed by automation as a good practise. This time, a placeholder called <code>secret-token.yaml</code> is show as an example:</p>
|
|
|
+<div class="highlight"><pre><span></span><code><span class="c1"># The namespace.yaml first</span>
|
|
|
+<span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">v1</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Namespace</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<div class="highlight"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">v1</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Secret</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">vault-token-global</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+<span class="nt">stringData</span><span class="p">:</span>
|
|
|
+ <span class="c1"># This token must be patched by overlays. Not here for security reasons</span>
|
|
|
+ <span class="nt">token</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">change-me-placeholder</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<h2 id="creating-the-references-to-repositories">Creating the references to repositories</h2>
|
|
|
+<p>Create a manifest called <code>repositories.yaml</code> to store the references to external repositories for Flux</p>
|
|
|
+<div class="highlight"><pre><span></span><code><span class="c1"># Reference to Helm repository</span>
|
|
|
+<span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">source.toolkit.fluxcd.io/v1beta1</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">HelmRepository</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+<span class="nt">spec</span><span class="p">:</span>
|
|
|
+ <span class="nt">interval</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">10m</span>
|
|
|
+ <span class="nt">url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">https://charts.external-secrets.io</span>
|
|
|
+<span class="nn">---</span>
|
|
|
+<span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">source.toolkit.fluxcd.io/v1beta1</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">GitRepository</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+<span class="nt">spec</span><span class="p">:</span>
|
|
|
+ <span class="nt">interval</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">10m</span>
|
|
|
+ <span class="nt">ref</span><span class="p">:</span>
|
|
|
+ <span class="nt">branch</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">main</span>
|
|
|
+ <span class="nt">url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">http://github.com/external-secrets/external-secrets</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<h2 id="deploy-the-crds">Deploy the CRDs</h2>
|
|
|
+<p>As mentioned, CRDs can be deployed using the official Helm package, but to solve the race condition, they will be deployed
|
|
|
+from our git repository using a Kustomization manifest called <code>deployment-crds.yaml</code> as follows:</p>
|
|
|
+<div class="highlight"><pre><span></span><code><span class="nn">---</span>
|
|
|
+<span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">kustomize.toolkit.fluxcd.io/v1beta2</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Kustomization</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets-crds</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+<span class="nt">spec</span><span class="p">:</span>
|
|
|
+ <span class="nt">interval</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">10m</span>
|
|
|
+ <span class="nt">path</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">./deploy/crds</span>
|
|
|
+ <span class="nt">prune</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span>
|
|
|
+ <span class="nt">sourceRef</span><span class="p">:</span>
|
|
|
+ <span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">GitRepository</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<h2 id="deploy-the-operator">Deploy the operator</h2>
|
|
|
+<p>The operator is deployed using a HelmRelease manifest to deploy the Helm package, but due to the special race condition,
|
|
|
+the deployment must be disabled in the <code>values</code> of the manifest called <code>deployment.yaml</code>, as follows:</p>
|
|
|
+<div class="highlight"><pre><span></span><code><span class="c1"># How to manage values files. Ref: https://fluxcd.io/docs/guides/helmreleases/#refer-to-values-inside-the-chart</span>
|
|
|
+<span class="c1"># How to inject values: https://fluxcd.io/docs/guides/helmreleases/#cloud-storage</span>
|
|
|
+<span class="nn">---</span>
|
|
|
+<span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">helm.toolkit.fluxcd.io/v2beta1</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">HelmRelease</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+<span class="nt">spec</span><span class="p">:</span>
|
|
|
+ <span class="c1"># Override Release name to avoid the pattern Namespace-Release</span>
|
|
|
+ <span class="c1"># Ref: https://fluxcd.io/docs/components/helm/api/#helm.toolkit.fluxcd.io/v2beta1.HelmRelease</span>
|
|
|
+ <span class="nt">releaseName</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+ <span class="nt">targetNamespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+ <span class="nt">interval</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">10m</span>
|
|
|
+ <span class="nt">chart</span><span class="p">:</span>
|
|
|
+ <span class="nt">spec</span><span class="p">:</span>
|
|
|
+ <span class="nt">chart</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+ <span class="nt">version</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">0.3.9</span>
|
|
|
+ <span class="nt">sourceRef</span><span class="p">:</span>
|
|
|
+ <span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">HelmRepository</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+ <span class="nt">values</span><span class="p">:</span>
|
|
|
+ <span class="nt">installCRDs</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">false</span>
|
|
|
+
|
|
|
+ <span class="c1"># Ref: https://fluxcd.io/docs/components/helm/api/#helm.toolkit.fluxcd.io/v2beta1.Install</span>
|
|
|
+ <span class="nt">install</span><span class="p">:</span>
|
|
|
+ <span class="nt">createNamespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<h2 id="deploy-the-crs">Deploy the CRs</h2>
|
|
|
+<p>Now, be ready for the arcane magic. Create a Kustomization manifest called <code>deployment-crs.yaml</code> with the following content:</p>
|
|
|
+<div class="highlight"><pre><span></span><code><span class="nn">---</span>
|
|
|
+<span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">kustomize.toolkit.fluxcd.io/v1beta2</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Kustomization</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets-crs</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+<span class="nt">spec</span><span class="p">:</span>
|
|
|
+ <span class="nt">dependsOn</span><span class="p">:</span>
|
|
|
+ <span class="p p-Indicator">-</span> <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets-crds</span>
|
|
|
+ <span class="nt">interval</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">10m</span>
|
|
|
+ <span class="nt">path</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">./infrastructure/external-secrets/crs</span>
|
|
|
+ <span class="nt">prune</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span>
|
|
|
+ <span class="nt">sourceRef</span><span class="p">:</span>
|
|
|
+ <span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">GitRepository</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<p>There are several interesting details to see here, that finally solves the race condition:</p>
|
|
|
+<ol>
|
|
|
+<li>First one is the field <code>dependsOn</code>, which points to a previous Kustomization called <code>external-secrets-crds</code>. This
|
|
|
+ dependency forces this deployment to wait for the other to be ready, before start being deployed.</li>
|
|
|
+<li>The reference to the place where to find the CRs
|
|
|
+ <div class="highlight"><pre><span></span><code><span class="nt">path</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">./infrastructure/external-secrets/crs</span>
|
|
|
+<span class="nt">sourceRef</span><span class="p">:</span>
|
|
|
+ <span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">GitRepository</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">flux-system</span>
|
|
|
+</code></pre></div>
|
|
|
+ Custom Resources will be searched in the relative path <code>./infrastructure/external-secrets/crs</code> of the GitRepository
|
|
|
+ called <code>flux-system</code>, which is a reference to the same repository that FluxCD watches to synchronize the cluster.
|
|
|
+ With fewer words, a reference to itself, but going to another directory called <code>crs</code></li>
|
|
|
+</ol>
|
|
|
+<p>Of course, allocate inside the mentioned path <code>./infrastructure/external-secrets/crs</code>, all the desired CRs to be deployed,
|
|
|
+for example, a manifest <code>clusterSecretStore.yaml</code> to reach your Hashicorp Vault as follows:</p>
|
|
|
+<div class="highlight"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets.io/v1alpha1</span>
|
|
|
+<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">ClusterSecretStore</span>
|
|
|
+<span class="nt">metadata</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">vault-backend-global</span>
|
|
|
+<span class="nt">spec</span><span class="p">:</span>
|
|
|
+ <span class="nt">provider</span><span class="p">:</span>
|
|
|
+ <span class="nt">vault</span><span class="p">:</span>
|
|
|
+ <span class="nt">server</span><span class="p">:</span> <span class="s">"https://vault.your-domain.com"</span>
|
|
|
+ <span class="nt">path</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">secret</span>
|
|
|
+ <span class="nt">version</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">v2</span>
|
|
|
+ <span class="nt">auth</span><span class="p">:</span>
|
|
|
+ <span class="c1"># points to a secret that contains a vault token</span>
|
|
|
+ <span class="c1"># https://www.vaultproject.io/docs/auth/token</span>
|
|
|
+ <span class="nt">tokenSecretRef</span><span class="p">:</span>
|
|
|
+ <span class="nt">name</span><span class="p">:</span> <span class="s">"vault-token-global"</span>
|
|
|
+ <span class="nt">key</span><span class="p">:</span> <span class="s">"token"</span>
|
|
|
+ <span class="nt">namespace</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">external-secrets</span>
|
|
|
+</code></pre></div>
|
|
|
+
|
|
|
+<h2 id="results">Results</h2>
|
|
|
+<p>At the end, the required files tree is shown in the following picture:</p>
|
|
|
+<p><img alt="FluxCD files tree" src="../pictures/screenshot_gitops_final_directory_tree.png" /></p>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </article>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </main>
|
|
|
+
|
|
|
+
|
|
|
+<footer class="md-footer">
|
|
|
+
|
|
|
+ <nav class="md-footer__inner md-grid" aria-label="Footer">
|
|
|
+
|
|
|
+
|
|
|
+ <a href="../guides-using-latest-image/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Using Latest Image" rel="prev">
|
|
|
+ <div class="md-footer__button md-icon">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
|
|
+ </div>
|
|
|
+ <div class="md-footer__title">
|
|
|
+ <div class="md-ellipsis">
|
|
|
+ <span class="md-footer__direction">
|
|
|
+ Previous
|
|
|
+ </span>
|
|
|
+ Using Latest Image
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <a href="../provider-aws-secrets-manager/" class="md-footer__link md-footer__link--next" aria-label="Next: Secrets Manager" rel="next">
|
|
|
+ <div class="md-footer__title">
|
|
|
+ <div class="md-ellipsis">
|
|
|
+ <span class="md-footer__direction">
|
|
|
+ Next
|
|
|
+ </span>
|
|
|
+ Secrets Manager
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="md-footer__button md-icon">
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+
|
|
|
+ </nav>
|
|
|
+
|
|
|
+ <div class="md-footer-meta md-typeset">
|
|
|
+ <div class="md-footer-meta__inner md-grid">
|
|
|
+ <div class="md-footer-copyright">
|
|
|
+
|
|
|
+ Made with
|
|
|
+ <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
|
|
+ Material for MkDocs
|
|
|
+ </a>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</footer>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="md-dialog" data-md-component="dialog">
|
|
|
+ <div class="md-dialog__inner md-typeset"></div>
|
|
|
+ </div>
|
|
|
+ <script id="__config" type="application/json">{"base": "..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../assets/javascripts/workers/search.b0710199.min.js", "version": null}</script>
|
|
|
+
|
|
|
+
|
|
|
+ <script src="../assets/javascripts/bundle.76f349be.min.js"></script>
|
|
|
+
|
|
|
+
|
|
|
+ </body>
|
|
|
+</html>
|