Sean Eagan 2ba6561854 Add helm-controller and source-controller
This adds functions for the helm-controller and source-controller from
Flux v2 [0]. The helm-controller depends on the source-controller and
so this includes a composite to wrap both. These components replace the
Helm Operator, which is now removed from the gating setup. The Helm Operator
function itself will be removed after a suitable migration period.

This also adds a format for Helm chart and Helm repository sourcing
to the versions catalog.

[0]: https://fluxcd.github.io/flux2

Closes: #372

Change-Id: I7287f1bb5b1ebd1dba9920cc0bed8c867720b4c1
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
2020-11-06 09:52:16 +00:00

39 lines
1.1 KiB
YAML

# These rules inject env vars into the source-controller function.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: source-controller-env-vars-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: quay.io/airshipit/replacement-transformer:dev
replacements:
# Replace the proxy vars
- source:
objref:
name: env-vars-catalogue
fieldref: env.HTTP_PROXY
target:
objref:
kind: Deployment
name: source-controller
fieldrefs: ["spec.template.spec.containers[name=manager].env[name=http_proxy].value%REPLACEMENT_HTTP_PROXY%"]
- source:
objref:
name: env-vars-catalogue
fieldref: env.HTTPS_PROXY
target:
objref:
kind: Deployment
name: source-controller
fieldrefs: ["spec.template.spec.containers[name=manager].env[name=https_proxy].value%REPLACEMENT_HTTPS_PROXY%"]
- source:
objref:
name: env-vars-catalogue
fieldref: env.NO_PROXY
target:
objref:
kind: Deployment
name: source-controller
fieldrefs: ["spec.template.spec.containers[name=manager].env[name=no_proxy].value%REPLACEMENT_NO_PROXY%"]