Skip to content

Commit

Permalink
examples: move kapp config to delivery template (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marty Spiewak committed Mar 23, 2022
1 parent e900599 commit 47376b7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
25 changes: 24 additions & 1 deletion examples/basic-delivery/app-operator/deploy-app.yaml
Expand Up @@ -37,6 +37,29 @@ spec:
- http:
url: $(deployment.url)$
template:
- ytt: {}
- ytt:
inline:
paths:
config.yaml: |
apiVersion: kapp.k14s.io/v1alpha1
kind: Config
rebaseRules:
- path:
- metadata
- annotations
- serving.knative.dev/creator
type: copy
sources: [new, existing]
resourceMatchers: &matchers
- apiVersionKindMatcher:
apiVersion: serving.knative.dev/v1
kind: Service
- path:
- metadata
- annotations
- serving.knative.dev/lastModifier
type: copy
sources: [new, existing]
resourceMatchers: *matchers
deploy:
- kapp: {}
25 changes: 1 addition & 24 deletions examples/gitwriter-sc/app-operator/config-service.yaml
Expand Up @@ -26,7 +26,7 @@ spec:
#@ load("@ytt:base64", "base64")
#@ def manifest():
manifest.yaml: #@ yaml.encode(service()) + "---\n" + yaml.encode(config())
manifest.yaml: #@ yaml.encode(service())
#@ end
#@ def service():
Expand Down Expand Up @@ -57,29 +57,6 @@ spec:
- name: registry-credentials
#@ end
#@ def config():
apiVersion: kapp.k14s.io/v1alpha1
kind: Config
rebaseRules:
- path:
- metadata
- annotations
- serving.knative.dev/creator
type: copy
sources: [new, existing]
resourceMatchers: &matchers
- apiVersionKindMatcher:
apiVersion: serving.knative.dev/v1
kind: Service
- path:
- metadata
- annotations
- serving.knative.dev/lastModifier
type: copy
sources: [new, existing]
resourceMatchers: *matchers
#@ end
---
apiVersion: v1
kind: ConfigMap
Expand Down

0 comments on commit 47376b7

Please sign in to comment.