Skip to content

Commit

Permalink
remove annotations added by the kyaml reader
Browse files Browse the repository at this point in the history
  • Loading branch information
natasha41575 committed Jul 28, 2021
1 parent 91b862b commit 97e7cb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
15 changes: 0 additions & 15 deletions api/krusty/fnplugin_test.go
Expand Up @@ -63,7 +63,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
config.kubernetes.io/path: deployment_nginx.yaml
tshirt-size: small
labels:
app: nginx
Expand Down Expand Up @@ -146,8 +145,6 @@ type: Opaque
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
annotations:
config.kubernetes.io/path: config/demo-budget_poddisruptionbudget.yaml
labels:
app: cockroachdb
name: demo
Expand All @@ -162,8 +159,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
annotations:
config.kubernetes.io/path: config/demo-public_service.yaml
labels:
app: cockroachdb
name: demo
Expand All @@ -184,7 +179,6 @@ apiVersion: v1
kind: Service
metadata:
annotations:
config.kubernetes.io/path: config/demo_service.yaml
prometheus.io/path: _status/vars
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
Expand All @@ -209,8 +203,6 @@ spec:
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
config.kubernetes.io/path: config/demo_statefulset.yaml
labels:
app: cockroachdb
name: demo
Expand Down Expand Up @@ -383,7 +375,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
config.kubernetes.io/path: deployment_nginx.yaml
tshirt-size: small
labels:
app: nginx
Expand Down Expand Up @@ -450,17 +441,13 @@ data:
apiVersion: v1
kind: Namespace
metadata:
annotations:
config.kubernetes.io/path: namespace_my-namespace.yaml
labels:
my-ns-name: function-test
name: my-namespace
---
apiVersion: v1
kind: Namespace
metadata:
annotations:
config.kubernetes.io/path: namespace_another-namespace.yaml
labels:
my-ns-name: function-test
name: another-namespace
Expand Down Expand Up @@ -508,8 +495,6 @@ data:
value: value
kind: ConfigMap
metadata:
annotations:
config.kubernetes.io/path: configmap_env.yaml
name: env
`)
}
5 changes: 5 additions & 0 deletions api/resource/resource.go
Expand Up @@ -13,6 +13,7 @@ import (
"sigs.k8s.io/kustomize/api/internal/utils"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/kio"
"sigs.k8s.io/kustomize/kyaml/kio/kioutil"
"sigs.k8s.io/kustomize/kyaml/resid"
kyaml "sigs.k8s.io/kustomize/kyaml/yaml"
"sigs.k8s.io/yaml"
Expand All @@ -35,6 +36,10 @@ var BuildAnnotations = []string{
utils.BuildAnnotationAllowKindChange,
utils.BuildAnnotationsRefBy,
utils.BuildAnnotationsGenOptions,

kioutil.PathAnnotation,
kioutil.IndexAnnotation,
kioutil.SeqIndentAnnotation,
}

func (r *Resource) ResetRNode(incoming *Resource) {
Expand Down

0 comments on commit 97e7cb1

Please sign in to comment.