Last active
April 14, 2021 11:03
-
-
Save to266/16d8e90aba81fd8bb5fe41828cecc382 to your computer and use it in GitHub Desktop.
fluxv2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: helm.toolkit.fluxcd.io/v2beta1 | |
kind: HelmRelease | |
metadata: | |
name: frontend | |
namespace: default | |
spec: | |
interval: 5m | |
chart: | |
spec: | |
chart: ./frontend/frontend | |
sourceRef: | |
kind: GitRepository | |
name: charts-repo | |
namespace: default | |
interval: 1m | |
values: | |
imagePullSecrets: | |
- name: gitlab | |
annotations: | |
sidecar.istio.io/inject: "false" | |
image: | |
repository: registry.gitlab.com/company/project/frontend | |
tag: release-0.8.0 # {"$imagepolicy": "default:frontend:tag"} | |
resources: | |
requests: | |
cpu: 10m | |
memory: 40Mi | |
limits: | |
cpu: 20m | |
memory: 100Mi | |
affinity: | |
podAntiAffinity: | |
preferredDuringSchedulingIgnoredDuringExecution: | |
# Prefer to spread out across zones from similar pods | |
- podAffinityTerm: | |
labelSelector: | |
matchExpressions: | |
- key: app.kubernetes.io/name | |
operator: In | |
values: | |
- frontend | |
topologyKey: topology.kubernetes.io/zone | |
weight: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: image.toolkit.fluxcd.io/v1alpha1 | |
kind: ImagePolicy | |
metadata: | |
name: frontend | |
namespace: default | |
spec: | |
imageRepositoryRef: | |
name: frontend | |
filterTags: | |
pattern: '^release-(?P<v>.*)' | |
extract: '$v' | |
policy: | |
semver: | |
range: '^0' | |
--- | |
apiVersion: image.toolkit.fluxcd.io/v1alpha1 | |
kind: ImageRepository | |
metadata: | |
name: frontend | |
namespace: default | |
spec: | |
image: registry.gitlab.com/company/project/frontend | |
interval: 1m0s | |
secretRef: | |
name: gitlab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: image.toolkit.fluxcd.io/v1alpha1 | |
kind: ImageUpdateAutomation | |
metadata: | |
name: staging | |
namespace: flux-system | |
spec: | |
checkout: | |
branch: master | |
gitRepositoryRef: | |
name: flux-system | |
commit: | |
authorEmail: fluxbot@luminovo.ai | |
authorName: fluxbot | |
messageTemplate: | | |
Automated image update | |
Files: | |
{{ range $filename, $_ := .Updated.Files -}} | |
- {{ $filename }} | |
{{ end -}} | |
Objects: | |
{{ range $resource, $_ := .Updated.Objects -}} | |
- {{ $resource.Kind }} {{ $resource.Name }} | |
{{ end -}} | |
Images: | |
{{ range .Updated.Images -}} | |
- {{.}} | |
{{ end -}} | |
interval: 1m0s | |
push: | |
branch: master | |
update: | |
path: ./clusters/staging # this refers to the path where either the above kustomization or helmrelease are. | |
strategy: Setters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 | |
kind: Kustomization | |
metadata: | |
name: frontend | |
namespace: flux-system | |
spec: | |
interval: 10m0s | |
sourceRef: | |
kind: GitRepository | |
name: flux-system | |
path: ./apps/frontend | |
prune: true | |
validation: client | |
patchesStrategicMerge: | |
- apiVersion: helm.toolkit.fluxcd.io/v2beta1 | |
kind: HelmRelease | |
metadata: | |
name: frontend | |
spec: | |
values: | |
image: | |
tag: release-0.8.0 # {"$imagepolicy": "default:frontend:tag"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment