diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 8603824984..81552e19c1 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -112,17 +112,6 @@ jobs: - name: "Run pause tests" run: | ./scripts/github-actions/ga-pause-test.sh - direct-tests: - runs-on: ubuntu-22.04 - timeout-minutes: 60 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version-file: 'go.mod' - - name: "run tests-e2e-direct" - run: | - ./scripts/github-actions/tests-e2e-direct.sh tests-e2e-fixtures-vcr: runs-on: ubuntu-22.04 timeout-minutes: 60 diff --git a/apis/monitoring/v1beta1/monitoringdashboard_types.go b/apis/monitoring/v1beta1/monitoringdashboard_types.go index 83ff6bb8f8..55e09df894 100644 --- a/apis/monitoring/v1beta1/monitoringdashboard_types.go +++ b/apis/monitoring/v1beta1/monitoringdashboard_types.go @@ -866,7 +866,7 @@ type MonitoringDashboardStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:categories=gcp,shortName=gcpmonitoringdashboard;gcpmonitoringdashboards // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="cnrm.cloud.google.com/directcrd=true";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true" +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/dcl2crd=true";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true" // +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" // +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" // +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_monitoringdashboards.monitoring.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_monitoringdashboards.monitoring.cnrm.cloud.google.com.yaml index bce37b0607..94cfc51bda 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_monitoringdashboards.monitoring.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_monitoringdashboards.monitoring.cnrm.cloud.google.com.yaml @@ -5,7 +5,7 @@ metadata: cnrm.cloud.google.com/version: 0.0.0-dev creationTimestamp: null labels: - cnrm.cloud.google.com/directcrd: "true" + cnrm.cloud.google.com/dcl2crd: "true" cnrm.cloud.google.com/managed-by-kcc: "true" cnrm.cloud.google.com/stability-level: stable cnrm.cloud.google.com/system: "true" diff --git a/pkg/clients/generated/apis/monitoring/v1beta1/monitoringdashboard_types.go b/pkg/clients/generated/apis/monitoring/v1beta1/monitoringdashboard_types.go index 635fbfc5e3..4fbb2e3abb 100644 --- a/pkg/clients/generated/apis/monitoring/v1beta1/monitoringdashboard_types.go +++ b/pkg/clients/generated/apis/monitoring/v1beta1/monitoringdashboard_types.go @@ -620,7 +620,7 @@ type MonitoringDashboardStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:categories=gcp,shortName=gcpmonitoringdashboard;gcpmonitoringdashboards // +kubebuilder:subresource:status -// +kubebuilder:metadata:labels="cnrm.cloud.google.com/directcrd=true";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true" +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/dcl2crd=true";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true" // +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" // +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" // +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" diff --git a/scripts/github-actions/tests-e2e-direct.sh b/scripts/github-actions/tests-e2e-direct.sh deleted file mode 100755 index 2c3e1c23cf..0000000000 --- a/scripts/github-actions/tests-e2e-direct.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -REPO_ROOT="$(git rev-parse --show-toplevel)" - -cd ${REPO_ROOT}/ - -echo "Downloading envtest assets..." -export KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path) - -echo "Running e2e tests samples for LoggingLogMetric direct reconciliation..." - -KCC_USE_DIRECT_RECONCILERS=LoggingLogMetric \ -GOLDEN_OBJECT_CHECKS=1 \ -GOLDEN_REQUEST_CHECKS=1 \ -E2E_KUBE_TARGET=envtest RUN_E2E=1 E2E_GCP_TARGET=mock \ - go test -test.count=1 -timeout 600s -v ./tests/e2e -run 'TestAllInSeries/samples/linear-log-metric|TestAllInSeries/samples/exponential-log-metric|TestAllInSeries/samples/int-log-metric|TestAllInSeries/samples/explicit-log-metric' - -echo "Running e2e tests fixtures for LoggingLogMetric direct reconciliation..." - -KCC_USE_DIRECT_RECONCILERS=LoggingLogMetric \ -GOLDEN_OBJECT_CHECKS=1 \ -GOLDEN_REQUEST_CHECKS=1 \ -E2E_KUBE_TARGET=envtest RUN_E2E=1 E2E_GCP_TARGET=mock \ - go test -test.count=1 -timeout 600s -v ./tests/e2e -run 'TestAllInSeries/fixtures/explicitlogmetric|TestAllInSeries/fixtures/exponentiallogmetric|TestAllInSeries/fixtures/linearlogmetric|TestAllInSeries/fixtures/logbucketmetric' - -echo "Running scenarios tests for LoggingLogMetric direct reconciliation..." - -KCC_USE_DIRECT_RECONCILERS=LoggingLogMetric \ -GOLDEN_REQUEST_CHECKS=1 E2E_KUBE_TARGET=envtest E2E_GCP_TARGET=mock RUN_E2E=1 \ - go test -test.count=1 -timeout 360s -v ./tests/e2e -run TestE2EScript/scenarios/fields \ No newline at end of file diff --git a/tests/e2e/unified_test.go b/tests/e2e/unified_test.go index 0542de30d1..91d400a2e5 100644 --- a/tests/e2e/unified_test.go +++ b/tests/e2e/unified_test.go @@ -48,6 +48,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" + + _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/register" ) func TestAllInSeries(t *testing.T) {