Skip to content

Commit

Permalink
Merge pull request #3417 from jasonvigil/fix-mgmt-conflict
Browse files Browse the repository at this point in the history
fix: Do not add management conflict annotaiton for direct resources
  • Loading branch information
google-oss-prow[bot] authored Dec 20, 2024
2 parents 34d4e72 + d74380e commit 287a254
Show file tree
Hide file tree
Showing 74 changed files with 18 additions and 122 deletions.
14 changes: 14 additions & 0 deletions pkg/gvks/supportedgvks/supportedgvks.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,17 @@ func BasedOnDCL(serviceMetaLoader metadata.ServiceMetadataLoader) []schema.Group
}
return gvkList
}

func IsDirectByGVK(gvk schema.GroupVersionKind) bool {
metadata, ok := SupportedGVKs[gvk]
if !ok {
return false
}
if metadata.Labels[k8s.TF2CRDLabel] == "true" {
return false
}
if metadata.Labels[k8s.DCL2CRDLabel] == "true" {
return false
}
return true
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryanalyticshub.cnrm.cloud.google.com/v1beta1
kind: BigQueryAnalyticsHubDataExchange
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryanalyticshub.cnrm.cloud.google.com/v1beta1
kind: BigQueryAnalyticsHubDataExchange
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryanalyticshub.cnrm.cloud.google.com/v1beta1
kind: BigQueryAnalyticsHubListing
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryanalyticshub.cnrm.cloud.google.com/v1beta1
kind: BigQueryAnalyticsHubListing
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1
kind: BigQueryConnectionConnection
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1
kind: BigQueryConnectionConnection
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1
kind: BigQueryConnectionConnection
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1
kind: BigQueryConnectionConnection
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1
kind: BigQueryConnectionConnection
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1
kind: BigQueryConnectionConnection
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1
kind: BigQueryConnectionConnection
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigquerydatatransfer.cnrm.cloud.google.com/v1beta1
kind: BigQueryDataTransferConfig
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: bigquerydatatransfer.cnrm.cloud.google.com/v1beta1
kind: BigQueryDataTransferConfig
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: certificatemanager.cnrm.cloud.google.com/v1beta1
kind: CertificateManagerDNSAuthorization
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: certificatemanager.cnrm.cloud.google.com/v1beta1
kind: CertificateManagerDNSAuthorization
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: certificatemanager.cnrm.cloud.google.com/v1beta1
kind: CertificateManagerDNSAuthorization
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: cloudbuild.cnrm.cloud.google.com/v1beta1
kind: CloudBuildWorkerPool
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: dataform.cnrm.cloud.google.com/v1beta1
kind: DataformRepository
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: dataform.cnrm.cloud.google.com/v1beta1
kind: DataformRepository
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: firestore.cnrm.cloud.google.com/v1beta1
kind: FirestoreDatabase
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: firestore.cnrm.cloud.google.com/v1beta1
kind: FirestoreDatabase
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: gkehub.cnrm.cloud.google.com/v1beta1
kind: GKEHubFeatureMembership
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: kms.cnrm.cloud.google.com/v1beta1
kind: KMSAutokeyConfig
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: kms.cnrm.cloud.google.com/v1beta1
kind: KMSKeyHandle
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogMetric
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogMetric
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogMetric
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogMetric
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringDashboard
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringDashboard
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringDashboard
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringDashboard
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: networkconnectivity.cnrm.cloud.google.com/v1alpha1
kind: NetworkConnectivityServiceConnectionPolicy
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: privilegedaccessmanager.cnrm.cloud.google.com/v1beta1
kind: PrivilegedAccessManagerEntitlement
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: privilegedaccessmanager.cnrm.cloud.google.com/v1beta1
kind: PrivilegedAccessManagerEntitlement
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: privilegedaccessmanager.cnrm.cloud.google.com/v1beta1
kind: PrivilegedAccessManagerEntitlement
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
Expand Down
Loading

0 comments on commit 287a254

Please sign in to comment.