Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
⚗️ replacing flux static deployment with kustomize
Browse files Browse the repository at this point in the history
  • Loading branch information
ChipWolf committed May 1, 2020
1 parent 6e9137a commit 81eff22
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 357 deletions.
5 changes: 5 additions & 0 deletions flux/.flux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
patchUpdated:
generators:
- command: kustomize build .
patchFile: flux-patch.yaml
38 changes: 0 additions & 38 deletions flux/flux-account.yaml

This file was deleted.

189 changes: 0 additions & 189 deletions flux/flux-deployment.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion flux/flux-helm-operator-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: flux-helm-operator
namespace: flux
namespace: flux
2 changes: 1 addition & 1 deletion flux/flux-helm-release-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ spec:
properties:
name:
description: Helm repository basic auth (not implemented)
type: string
type: string
4 changes: 0 additions & 4 deletions flux/flux-namespace.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions flux/flux-secret.yaml

This file was deleted.

77 changes: 4 additions & 73 deletions flux/helm-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,57 +20,16 @@ spec:
spec:
serviceAccountName: flux-helm-operator
volumes:
#
# You will need these two volumes if you want to establish validated TLS
# connections against Tiller
#
# - name: helm-tls-ca
# configMap:
# name: flux-helm-tls-ca-config
# defaultMode: 0600
# Secret type kubernetes.io/tls
# - name: flux-helm-tls-cert
# secret:
# secretName: flux-helm-tls-cert
# defaultMode: 0400
#
# The following volume is for using a customised known_hosts file,
# which you will need to do if you host your own git repo rather
# than using github or the like. You'll also need to mount it
# into the container, below.
#
# You may also wish to provide an ssh_config file,
# mentioning more than one `IdentityFile`; for instance, if you're
# using more than one GitHub repo. NB the entry key should be
# "config" rather than "ssh_config" if mounted in ~/.ssh/.
#
# - name: sshdir
# configMap:
# name: flux-ssh-config
# defaultMode: 0400

# SSH key to access the Git repository
- name: git-key
secret:
secretName: flux-git-deploy
defaultMode: 0400 # when mounted read-only, we won't be able to chmod

# These two volumes are for mounting a repositories.yaml file,
# and providing a cache directory. The latter is needed because
# mounting the former will make the cache/ directory read-only.
#
# - name: repositories-yaml
# secret:
# secretName: flux-helm-repositories
# - name: repositories-cache
# emptyDir: {}

defaultMode: 0400
containers:
- name: flux-helm-operator
# There are no ":latest" images for helm-operator. Find the most recent
# release or image version at https://hub.docker.com/r/weaveworks/helm-operator/tags
# release or image version at https://hub.docker.com/r/fluxcd/helm-operator/tags
# and replace the tag here.
image: docker.io/fluxcd/helm-operator:1.0.0-rc9
image: docker.io/fluxcd/helm-operator:1.0.1
imagePullPolicy: IfNotPresent
ports:
- name: http
Expand All @@ -92,36 +51,8 @@ spec:
cpu: 50m
memory: 64Mi
volumeMounts:
# Include this if you need to mount a customised known_hosts or ssh_config
# file; you'll also need the volume declared above.
# - name: sshdir
# mountPath: /root/.ssh
# readOnly: true

- name: git-key
mountPath: /etc/fluxd/ssh

# - name: repositories-yaml
# mountPath: /var/fluxd/helm/repository
# - name: repositories-cache
# mountPath: /var/fluxd/helm/repository/cache
# - name: helm-tls-certs
# mountPath: /etc/fluxd/helm
# readOnly: true
# - name: helm-tls-ca
# mountPath: /etc/fluxd/helm-ca
# readOnly: true
args:
# How to find Tiller
- --tiller-namespace=kube-system
# Comment out to to establish validated TLS connections against Tiller
# - --tiller-tls-ca-cert-path=/etc/fluxd/helm-ca/ca.crt
# - --tiller-tls-enable=true
# - --tiller-tls-key-path=/etc/fluxd/helm/tls.key
# - --tiller-tls-cert-path=/etc/fluxd/helm/tls.crt
# - --tiller-tls-verify=true
# - --tiller-tls-ca-cert-path=/etc/fluxd/helm-ca/ca.crt

- --enabled-helm-versions=v3


- --enabled-helm-versions=v3
5 changes: 5 additions & 0 deletions flux/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bases:
- github.com/fluxcd/flux/deploy?ref=1.19.0
#- github.com/fluxcd/helm-operator/deploy?ref=v1.0.1
patchesStrategicMerge:
- patch.yaml
Loading

0 comments on commit 81eff22

Please sign in to comment.