Skip to content

Commit

Permalink
ztp: reference: Remove allowLabels template
Browse files Browse the repository at this point in the history
  • Loading branch information
natifridman committed Sep 29, 2024
1 parent 81e6f7c commit 976ec3d
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 75 deletions.
3 changes: 0 additions & 3 deletions ztp/kube-compare-reference/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ parts:

templateFunctionFiles:
- validate_node_selector.tmpl
- optional_labels.tmpl
- unordered_list.tmpl

fieldsToOmit:
Expand All @@ -184,13 +183,11 @@ fieldsToOmit:
- pathToKey: metadata.annotations."machineconfiguration.openshift.io/mc-name-suffix"
- pathToKey: metadata.labels."kubernetes.io/metadata.name"
- pathToKey: metadata.labels."olm.operatorgroup.uid"
- pathToKey: metadata.labels."pod-security.kubernetes.io"
- pathToKey: metadata.labels."security.openshift.io/scc.podSecurityLabelSync"
- pathToKey: metadata.resourceVersion
- pathToKey: metadata.uid
- pathToKey: spec.finalizers
- pathToKey: metadata.creationTimestamp
- pathToKey: metadata."pod-security.kubernetes.io"
- pathToKey: metadata.generation
- pathToKey: status # TODO: We need to check status in Subscription and CatalogSource. CNF-13521
- pathToKey: metadata.finalizers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@ metadata:
name: openshift-local-storage
annotations:
workload.openshift.io/allowed: management
{{- if .metadata.labels }}
labels:
{{- template "allowLabels" (list .metadata.labels
"pod-security.kubernetes.io"
) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,3 @@ apiVersion: v1
kind: Namespace
metadata:
name: vran-acceleration-operators
{{- if .metadata.labels }}
labels:
{{- template "allowLabels" (list .metadata.labels
"pod-security.kubernetes.io"
) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ apiVersion: v1
kind: Namespace
metadata:
name: openshift-storage
{{- if .metadata.labels }}
labels:
# from 4.15+ LVM operator can be part of the management partition.
{{- template "requiredLabels" (list .metadata.labels
"workload.openshift.io/allowed: \"management\""
"openshift.io/cluster-monitoring: \"true\""
) }}
{{- template "allowLabels" (list .metadata.labels
"pod-security.kubernetes.io"
) }}
{{- end }}
workload.openshift.io/allowed: "management"
openshift.io/cluster-monitoring: "true"
21 changes: 0 additions & 21 deletions ztp/kube-compare-reference/optional_labels.tmpl

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@ metadata:
name: openshift-logging
annotations:
workload.openshift.io/allowed: management
{{- if .metadata.labels }}
labels:
{{- template "allowLabels" (list .metadata.labels
"pod-security.kubernetes.io"
) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,3 @@ metadata:
workload.openshift.io/allowed: management
labels:
kubernetes.io/metadata.name: openshift-lifecycle-agent
{{- if .metadata.labels }}
labels:
{{- template "requiredLabels" (list .metadata.labels
"kubernetes.io/metadata.name: openshift-lifecycle-agent"
) }}
{{- template "allowLabels" (list .metadata.labels
"pod-security.kubernetes.io"
) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,3 @@ metadata:
workload.openshift.io/allowed: management
labels:
openshift.io/cluster-monitoring: "true"
{{- if .metadata.labels }}
labels:
{{- template "requiredLabels" (list .metadata.labels
"openshift.io/cluster-monitoring: \"true\""
) }}
{{- template "allowLabels" (list .metadata.labels
"pod-security.kubernetes.io"
) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@ metadata:
name: openshift-sriov-network-operator
annotations:
workload.openshift.io/allowed: management
{{- if .metadata.labels }}
labels:
{{- template "allowLabels" (list .metadata.labels
"pod-security.kubernetes.io"
) }}
{{- end }}

0 comments on commit 976ec3d

Please sign in to comment.