Skip to content

Commit

Permalink
chore: remove commented code
Browse files Browse the repository at this point in the history
Signed-off-by: ShutingZhao <[email protected]>
  • Loading branch information
realshuting committed Aug 13, 2024
1 parent 7e0494b commit 50c2d5d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 41 deletions.
4 changes: 0 additions & 4 deletions .github/actions/kyverno-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ runs:
run: |
kubectl -n kyverno get pod
kubectl -n kyverno describe pod | grep -i events -A10
- shell: bash
run: |
kubectl -n kyverno get ur
kubectl -n kyverno get ur -o yaml
- shell: bash
run: |
kubectl -n kyverno logs deploy/kyverno-admission-controller --all-containers
Expand Down
6 changes: 1 addition & 5 deletions api/kyverno/v2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const (
URMutateTriggerAPIVersionLabel = "mutate.updaterequest.kyverno.io/trigger-apiversion"

// URGeneratePolicyLabel adds the policy name to URs for generate policies
URGeneratePolicyLabel = "generate.kyverno.io/policy-name"
// URGenerateResourceNameLabel = "generate.kyverno.io/resource-name"
// URGenerateResourceUIDLabel = "generate.kyverno.io/resource-uid"
// URGenerateResourceNSLabel = "generate.kyverno.io/resource-namespace"
// URGenerateResourceKindLabel = "generate.kyverno.io/resource-kind"
URGeneratePolicyLabel = "generate.kyverno.io/policy-name"
URGenerateRetryCountAnnotation = "generate.kyverno.io/retry-count"
)
6 changes: 0 additions & 6 deletions pkg/background/common/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ func GenerateLabelsSet(policyKey string) pkglabels.Set {
set := pkglabels.Set{
kyvernov2.URGeneratePolicyLabel: policyName,
}
// isNil := trigger == nil || (reflect.ValueOf(trigger).Kind() == reflect.Ptr && reflect.ValueOf(trigger).IsNil())
// if !isNil {
// set[kyvernov2.URGenerateResourceUIDLabel] = string(trigger.GetUID())
// set[kyvernov2.URGenerateResourceNSLabel] = trigger.GetNamespace()
// set[kyvernov2.URGenerateResourceKindLabel] = trigger.GetKind()
// }
return set
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# apiVersion: networking.k8s.io/v1
# kind: NetworkPolicy
# metadata:
# labels:
# created-by: kyverno
# name: default-deny
# namespace: red-ns
# spec:
# podSelector: {}
# policyTypes:
# - Ingress
# - Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# apiVersion: networking.k8s.io/v1
# kind: NetworkPolicy
# metadata:
# labels:
# created-by: kyverno
# name: default-deny
# namespace: red-ns
# spec:
# podSelector: {}
# policyTypes:
# - Ingress
# - Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down

0 comments on commit 50c2d5d

Please sign in to comment.