-
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.
k8s: update base svc pkg to avoid merge bug downstream (#108)
- Loading branch information
1 parent
1072570
commit f01f13a
Showing
8 changed files
with
73 additions
and
37 deletions.
There are no files selected for viewing
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
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
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
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,15 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
metadata: # kpt-merge: /svc-example | ||
name: svc-frontend | ||
metadata: # kpt-merge: /svc | ||
name: svc | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
internal.kpt.dev/upstream-identifier: 'kustomize.config.k8s.io|Kustomization|default|svc-example' | ||
internal.kpt.dev/upstream-identifier: 'kustomize.config.k8s.io|Kustomization|default|svc' | ||
resources: | ||
- ./svc.yaml | ||
patches: | ||
- target: | ||
annotationSelector: internal.kpt.dev/upstream-identifier | ||
patch: |- | ||
- op: remove | ||
path: /metadata/annotations/internal.kpt.dev~1upstream-identifier | ||
components: | ||
- ./remove-kpt-internal-annotations/ |
20 changes: 20 additions & 0 deletions
20
k8s/base/svc-frontend/remove-kpt-internal-annotations/Kptfile
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: remove-kpt-internal-annotations | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
upstream: | ||
type: git | ||
git: | ||
repo: https://github.com/LCOGT/kpt-pkg-catalog | ||
directory: /remove-kpt-internal-annotations | ||
ref: main | ||
updateStrategy: resource-merge | ||
upstreamLock: | ||
type: git | ||
git: | ||
repo: https://github.com/LCOGT/kpt-pkg-catalog | ||
directory: /remove-kpt-internal-annotations | ||
ref: main | ||
commit: c58213d7a52130c977fdff0a51f4bd4fb5ca73a3 |
25 changes: 25 additions & 0 deletions
25
k8s/base/svc-frontend/remove-kpt-internal-annotations/README.md
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# remove-kpt-internal-annotations | ||
|
||
## Description | ||
|
||
This package provides a [Kustomize `Component`](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/1802-kustomize-components) | ||
that can be used to remove `internal.kpt.dev/upstream-identifier` annotations from all rendered KRM objects. | ||
|
||
## Usage | ||
|
||
Clone this package: | ||
|
||
```shell | ||
kpt pkg get https://github.com/LCOGT/kpt-pkg-catalog/remove-kpt-internal-annotations | ||
``` | ||
|
||
And then reference it from another Kustomization: | ||
|
||
|
||
```yaml | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
components: | ||
- ./remove-kpt-internal-annotations/ | ||
``` |
13 changes: 13 additions & 0 deletions
13
k8s/base/svc-frontend/remove-kpt-internal-annotations/kustomization.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
metadata: # kpt-merge: /remove-kpt-internal-annotations | ||
name: remove-kpt-internal-annotations | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
internal.kpt.dev/upstream-identifier: 'kustomize.config.k8s.io|Component|default|remove-kpt-internal-annotations' | ||
patches: | ||
- target: | ||
annotationSelector: internal.kpt.dev/upstream-identifier | ||
patch: |- | ||
- op: remove | ||
path: /metadata/annotations/internal.kpt.dev~1upstream-identifier |
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