-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(k8s/samples): shorten fluxtomizations by using yaml anchors
- Loading branch information
Showing
3 changed files
with
251 additions
and
347 deletions.
There are no files selected for viewing
198 changes: 83 additions & 115 deletions
198
evaluation/kubernetes/apps/samples/bookinfo/with-passthrough-filter/ks.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,85 @@ | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-details | ||
namespace: flux-system | ||
spec: | ||
dependsOn: | ||
- name: cluster-apps-istio-system-istiod | ||
path: ./evaluation/kubernetes/apps/samples/bookinfo/_template/filter | ||
targetNamespace: bookinfo-with-passthrough-filter | ||
postBuild: | ||
substitute: | ||
filter_name: passthrough | ||
app: details | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: prose-k8s-home-ops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 3m | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-ratings | ||
namespace: flux-system | ||
spec: | ||
dependsOn: | ||
- name: cluster-apps-istio-system-istiod | ||
path: ./evaluation/kubernetes/apps/samples/bookinfo/_template/filter | ||
targetNamespace: bookinfo-with-passthrough-filter | ||
postBuild: | ||
substitute: | ||
filter_name: passthrough | ||
app: ratings | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: prose-k8s-home-ops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 3m | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-reviews | ||
namespace: flux-system | ||
spec: | ||
dependsOn: | ||
- name: cluster-apps-istio-system-istiod | ||
path: ./evaluation/kubernetes/apps/samples/bookinfo/_template/filter | ||
targetNamespace: bookinfo-with-passthrough-filter | ||
postBuild: | ||
substitute: | ||
filter_name: passthrough | ||
app: reviews | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: prose-k8s-home-ops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 3m | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-productpage | ||
namespace: flux-system | ||
spec: | ||
dependsOn: | ||
- name: cluster-apps-istio-system-istiod | ||
path: ./evaluation/kubernetes/apps/samples/bookinfo/_template/filter | ||
targetNamespace: bookinfo-with-passthrough-filter | ||
postBuild: | ||
substitute: | ||
filter_name: passthrough | ||
app: productpage | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: prose-k8s-home-ops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 3m | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
apiVersion: v1 | ||
kind: List | ||
extra: | ||
filterName: &filterName passthrough | ||
name: &name bookinfo-with-passthrough-filter | ||
namespace: flux-system | ||
spec: | ||
dependsOn: | ||
- name: bookinfo-envoy-passthrough-filter-details | ||
- name: bookinfo-envoy-passthrough-filter-ratings | ||
- name: bookinfo-envoy-passthrough-filter-reviews | ||
- name: bookinfo-envoy-passthrough-filter-productpage | ||
path: ./evaluation/kubernetes/apps/samples/bookinfo/_template/app | ||
targetNamespace: *name | ||
postBuild: | ||
substitute: | ||
ingress_name: *name | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: prose-k8s-home-ops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 3m | ||
|
||
baseSpec: &baseSpec | ||
targetNamespace: *name | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: prose-k8s-home-ops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 3m | ||
|
||
filterSpec: &filterSpec | ||
<<: *baseSpec | ||
dependsOn: | ||
- name: cluster-apps-istio-system-istiod | ||
path: ./evaluation/kubernetes/apps/samples/bookinfo/_template/filter | ||
|
||
items: | ||
- apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: *name | ||
namespace: flux-system | ||
spec: | ||
<<: *baseSpec | ||
dependsOn: | ||
- name: bookinfo-envoy-passthrough-filter-details | ||
- name: bookinfo-envoy-passthrough-filter-ratings | ||
- name: bookinfo-envoy-passthrough-filter-reviews | ||
- name: bookinfo-envoy-passthrough-filter-productpage | ||
path: ./evaluation/kubernetes/apps/samples/bookinfo/_template/app | ||
postBuild: | ||
substitute: | ||
ingress_name: *name | ||
- apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-details | ||
namespace: flux-system | ||
spec: | ||
<<: *filterSpec | ||
postBuild: | ||
substitute: | ||
filter_name: *filterName | ||
app: details | ||
- apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-ratings | ||
namespace: flux-system | ||
spec: | ||
<<: *filterSpec | ||
postBuild: | ||
substitute: | ||
filter_name: *filterName | ||
app: ratings | ||
- apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-reviews | ||
namespace: flux-system | ||
spec: | ||
<<: *filterSpec | ||
postBuild: | ||
substitute: | ||
filter_name: *filterName | ||
app: reviews | ||
- apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: bookinfo-envoy-passthrough-filter-productpage | ||
namespace: flux-system | ||
spec: | ||
<<: *filterSpec | ||
postBuild: | ||
substitute: | ||
filter_name: *filterName | ||
app: productpage |
Oops, something went wrong.