diff --git a/docs/pipeline-api.md b/docs/pipeline-api.md index a3b26dc54df..c922adeda39 100644 --- a/docs/pipeline-api.md +++ b/docs/pipeline-api.md @@ -2160,8 +2160,8 @@ with those declared in the pipeline.

Status
- -knative.dev/pkg/apis/duck/v1beta1.Status + +knative.dev/pkg/apis/duck/v1.Status @@ -9525,8 +9525,8 @@ with those declared in the pipeline.

Status
- -knative.dev/pkg/apis/duck/v1beta1.Status + +knative.dev/pkg/apis/duck/v1.Status @@ -12956,8 +12956,8 @@ Kubernetes core/v1.ResourceRequirements Status
- -knative.dev/pkg/apis/duck/v1beta1.Status + +knative.dev/pkg/apis/duck/v1.Status @@ -13824,7 +13824,7 @@ string

CustomRunStatus

-(Appears on:CustomRun) +(Appears on:CustomRun, CustomRunStatusFields)

CustomRunStatus defines the observed state of CustomRun

diff --git a/pkg/apis/pipeline/v1/pipelinerun_types.go b/pkg/apis/pipeline/v1/pipelinerun_types.go index 11f8296395b..2a4fe0c2618 100644 --- a/pkg/apis/pipeline/v1/pipelinerun_types.go +++ b/pkg/apis/pipeline/v1/pipelinerun_types.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/utils/clock" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" ) // +genclient @@ -285,7 +285,7 @@ const ( // PipelineRunStatus defines the observed state of PipelineRun type PipelineRunStatus struct { - duckv1beta1.Status `json:",inline"` + duckv1.Status `json:",inline"` // PipelineRunStatusFields inlines the status fields. PipelineRunStatusFields `json:",inline"` diff --git a/pkg/apis/pipeline/v1beta1/pipelinerun_types.go b/pkg/apis/pipeline/v1beta1/pipelinerun_types.go index 6e81abd7bea..c8cb9198130 100644 --- a/pkg/apis/pipeline/v1beta1/pipelinerun_types.go +++ b/pkg/apis/pipeline/v1beta1/pipelinerun_types.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/utils/clock" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" ) // +genclient @@ -298,7 +298,7 @@ const ( // PipelineRunStatus defines the observed state of PipelineRun type PipelineRunStatus struct { - duckv1beta1.Status `json:",inline"` + duckv1.Status `json:",inline"` // PipelineRunStatusFields inlines the status fields. PipelineRunStatusFields `json:",inline"` diff --git a/pkg/apis/pipeline/v1beta1/taskrun_types.go b/pkg/apis/pipeline/v1beta1/taskrun_types.go index 76b3dee6474..8c70b63f30c 100644 --- a/pkg/apis/pipeline/v1beta1/taskrun_types.go +++ b/pkg/apis/pipeline/v1beta1/taskrun_types.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/utils/clock" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" ) // TaskRunSpec defines the desired state of TaskRun @@ -133,7 +133,7 @@ var taskRunCondSet = apis.NewBatchConditionSet() // TaskRunStatus defines the observed state of TaskRun type TaskRunStatus struct { - duckv1beta1.Status `json:",inline"` + duckv1.Status `json:",inline"` // TaskRunStatusFields inlines the status fields. TaskRunStatusFields `json:",inline"` diff --git a/pkg/apis/pipeline/v1beta1/taskrun_types_test.go b/pkg/apis/pipeline/v1beta1/taskrun_types_test.go index fe0faa26479..9a567a83dbd 100644 --- a/pkg/apis/pipeline/v1beta1/taskrun_types_test.go +++ b/pkg/apis/pipeline/v1beta1/taskrun_types_test.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" ) func TestTaskRun_GetPipelineRunPVCName(t *testing.T) { @@ -110,7 +110,7 @@ func TestTaskRun_HasPipelineRun(t *testing.T) { func TestTaskRunIsDone(t *testing.T) { tr := &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, @@ -154,7 +154,7 @@ func TestTaskRunIsCancelledWithMessage(t *testing.T) { func TestTaskRunIsTaskRunResultVerified(t *testing.T) { tr := &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionType(v1beta1.TaskRunConditionResultsVerified.String()), Status: corev1.ConditionTrue, @@ -175,7 +175,7 @@ func TestTaskRunIsTaskRunResultVerified(t *testing.T) { func TestTaskRunEmptyIsTaskRunResultVerified(t *testing.T) { tr := &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{}, + Status: duckv1.Status{}, }, } if tr.IsTaskRunResultVerified() { @@ -186,7 +186,7 @@ func TestTaskRunEmptyIsTaskRunResultVerified(t *testing.T) { func TestTaskRunIsTaskRunResultDone(t *testing.T) { tr := &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionType(v1beta1.TaskRunConditionResultsVerified.String()), Status: corev1.ConditionUnknown, @@ -207,7 +207,7 @@ func TestTaskRunIsTaskRunResultDone(t *testing.T) { func TestTaskRunEmptyIsTaskRunResultDone(t *testing.T) { tr := &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{}, + Status: duckv1.Status{}, }, } if tr.IsTaskRunResultDone() { @@ -291,7 +291,7 @@ func TestHasTimedOut(t *testing.T) { name: "TaskRun not started", taskRun: &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, @@ -312,7 +312,7 @@ func TestHasTimedOut(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, @@ -333,7 +333,7 @@ func TestHasTimedOut(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, diff --git a/pkg/pipelinerunmetrics/metrics_test.go b/pkg/pipelinerunmetrics/metrics_test.go index 720458b8fa5..02ada28a570 100644 --- a/pkg/pipelinerunmetrics/metrics_test.go +++ b/pkg/pipelinerunmetrics/metrics_test.go @@ -32,7 +32,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/metrics/metricstest" // Required to setup metrics env for testing _ "knative.dev/pkg/metrics/testing" ) @@ -125,8 +125,8 @@ func TestRecordPipelineRunDurationCount(t *testing.T) { PipelineRef: &v1beta1.PipelineRef{Name: "pipeline-1"}, }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -157,8 +157,8 @@ func TestRecordPipelineRunDurationCount(t *testing.T) { PipelineRef: &v1beta1.PipelineRef{Name: "pipeline-1"}, }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -192,8 +192,8 @@ func TestRecordPipelineRunDurationCount(t *testing.T) { PipelineRef: &v1beta1.PipelineRef{Name: "pipeline-1"}, }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -220,8 +220,8 @@ func TestRecordPipelineRunDurationCount(t *testing.T) { PipelineRef: &v1beta1.PipelineRef{Name: "pipeline-1"}, }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, Reason: ReasonCancelled, @@ -253,8 +253,8 @@ func TestRecordPipelineRunDurationCount(t *testing.T) { PipelineRef: &v1beta1.PipelineRef{Name: "pipeline-1"}, }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, @@ -286,8 +286,8 @@ func TestRecordPipelineRunDurationCount(t *testing.T) { Status: v1beta1.PipelineRunSpecStatusPending, }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, @@ -341,8 +341,8 @@ func TestRecordRunningPipelineRunsCount(t *testing.T) { return &v1beta1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{Name: names.SimpleNameGenerator.RestrictLengthWithRandomSuffix("pipelinerun-")}, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: status, }}, diff --git a/pkg/pod/pod_test.go b/pkg/pod/pod_test.go index ee9bcc31e71..7e5a7817d74 100644 --- a/pkg/pod/pod_test.go +++ b/pkg/pod/pod_test.go @@ -25,7 +25,7 @@ import ( "time" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/kmeta" @@ -1620,14 +1620,14 @@ _EOF_ trStatus: v1beta1.TaskRunStatus{ TaskRunStatusFields: v1beta1.TaskRunStatusFields{ RetriesStatus: []v1beta1.TaskRunStatus{{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, }, }, { - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, diff --git a/pkg/pod/status_test.go b/pkg/pod/status_test.go index abb4842badc..c44f2b679ac 100644 --- a/pkg/pod/status_test.go +++ b/pkg/pod/status_test.go @@ -28,7 +28,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/logging" ) @@ -1551,26 +1551,26 @@ func TestMarkStatusSuccess(t *testing.T) { } } -func statusRunning() duckv1beta1.Status { +func statusRunning() duckv1.Status { var trs v1beta1.TaskRunStatus markStatusRunning(&trs, v1beta1.TaskRunReasonRunning.String(), "Not all Steps in the Task have finished executing") return trs.Status } -func statusFailure(reason, message string) duckv1beta1.Status { +func statusFailure(reason, message string) duckv1.Status { var trs v1beta1.TaskRunStatus markStatusFailure(&trs, reason, message) return trs.Status } -func statusSuccess() duckv1beta1.Status { +func statusSuccess() duckv1.Status { var trs v1beta1.TaskRunStatus markStatusSuccess(&trs) return trs.Status } -func statusPending(reason, message string) duckv1beta1.Status { - return duckv1beta1.Status{ +func statusPending(reason, message string) duckv1.Status { + return duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, diff --git a/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go b/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go index db23a4e2d2c..24a2dca945f 100644 --- a/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go +++ b/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go @@ -32,7 +32,7 @@ import ( "k8s.io/client-go/tools/record" clock "k8s.io/utils/clock/testing" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/controller" "knative.dev/pkg/logging" rtesting "knative.dev/pkg/reconciler/testing" @@ -107,8 +107,8 @@ func TestSendCloudEvents(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{apis.Condition{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, Reason: "somethingelse", @@ -172,8 +172,8 @@ func TestSendCloudEvents(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{apis.Condition{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, Reason: "somethingelse", @@ -265,8 +265,8 @@ func TestSendCloudEventsErrors(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{apis.Condition{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, Reason: "somethingelse", @@ -301,8 +301,8 @@ func TestSendCloudEventsErrors(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{apis.Condition{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, Reason: "somethingelse", @@ -546,7 +546,7 @@ func TestInitializeCloudEvents(t *testing.T) { func TestSendCloudEventWithRetries(t *testing.T) { - objectStatus := duckv1beta1.Status{ + objectStatus := duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, diff --git a/pkg/reconciler/events/cloudevent/cloudevent_test.go b/pkg/reconciler/events/cloudevent/cloudevent_test.go index e3e8234d2f4..fc5c7cf5042 100644 --- a/pkg/reconciler/events/cloudevent/cloudevent_test.go +++ b/pkg/reconciler/events/cloudevent/cloudevent_test.go @@ -27,7 +27,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" ) const ( @@ -50,7 +49,7 @@ func getTaskRunByCondition(status corev1.ConditionStatus, reason string) *v1beta }, Spec: v1beta1.TaskRunSpec{}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: status, @@ -74,7 +73,7 @@ func getPipelineRunByCondition(status corev1.ConditionStatus, reason string) *v1 }, Spec: v1beta1.PipelineRunSpec{}, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: status, diff --git a/pkg/reconciler/events/event_test.go b/pkg/reconciler/events/event_test.go index c54c711e514..25f0b64be39 100644 --- a/pkg/reconciler/events/event_test.go +++ b/pkg/reconciler/events/event_test.go @@ -30,7 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/controller" rtesting "knative.dev/pkg/reconciler/testing" ) @@ -177,7 +177,7 @@ func TestEmitError(t *testing.T) { } func TestEmit(t *testing.T) { - objectStatus := duckv1beta1.Status{ + objectStatus := duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, diff --git a/pkg/reconciler/pipelinerun/pipelinerun_test.go b/pkg/reconciler/pipelinerun/pipelinerun_test.go index 3345595c05f..d5b70c8bf2b 100644 --- a/pkg/reconciler/pipelinerun/pipelinerun_test.go +++ b/pkg/reconciler/pipelinerun/pipelinerun_test.go @@ -60,7 +60,6 @@ import ( clock "k8s.io/utils/clock/testing" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" cminformer "knative.dev/pkg/configmap/informer" "knative.dev/pkg/controller" "knative.dev/pkg/kmeta" @@ -1416,7 +1415,7 @@ status: expectedTaskRunsStatus[taskRunName] = &v1beta1.PipelineRunTaskRunStatus{ PipelineTaskName: "hello-world-1", Status: &v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{Type: apis.ConditionSucceeded}}, }, }, @@ -2117,7 +2116,7 @@ func runTestReconcileOnCancelledRunFinallyPipelineRunWithFinalTaskAndRetries(t * "test-pipeline-run-cancelled-run-finally-hello-world": { PipelineTaskName: "hello-world-1", Status: &v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, @@ -5845,7 +5844,7 @@ status: expectedTaskRunsStatus[taskRunDone.Name] = &v1beta1.PipelineRunTaskRunStatus{ PipelineTaskName: "hello-world-1", Status: &v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ { Type: apis.ConditionSucceeded, @@ -5859,7 +5858,7 @@ status: expectedTaskRunsStatus[taskRunOrphaned.Name] = &v1beta1.PipelineRunTaskRunStatus{ PipelineTaskName: "hello-world-2", Status: &v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ { Type: apis.ConditionSucceeded, @@ -6479,8 +6478,8 @@ func getPipelineRun(pr, p string, status corev1.ConditionStatus, reason string, ServiceAccountName: "test-sa", }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{ apis.Condition{ Type: apis.ConditionSucceeded, Status: status, @@ -6518,7 +6517,7 @@ func getTaskRunStatus(t string, status corev1.ConditionStatus) *v1beta1.Pipeline return &v1beta1.PipelineRunTaskRunStatus{ PipelineTaskName: t, Status: &v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ {Type: apis.ConditionSucceeded, Status: status}, }, @@ -7781,8 +7780,8 @@ func createHelloWorldTaskRunWithStatus( ) *v1beta1.TaskRun { p := createHelloWorldTaskRun(t, trName, ns, prName, pName) p.Status = v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{condition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{condition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ PodName: podName, diff --git a/pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go b/pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go index 6d4ceffb748..8f159f18a88 100644 --- a/pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go +++ b/pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go @@ -35,7 +35,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" logtesting "knative.dev/pkg/logging/testing" "sigs.k8s.io/yaml" ) @@ -118,7 +118,7 @@ func TestUpdatePipelineRunStatusFromTaskRuns(t *testing.T) { taskRunsPRStatusData := getUpdateStatusTaskRunsData(t) - prRunningStatus := duckv1beta1.Status{ + prRunningStatus := duckv1.Status{ Conditions: []apis.Condition{ { Type: "Succeeded", @@ -158,7 +158,7 @@ func TestUpdatePipelineRunStatusFromTaskRuns(t *testing.T) { } prStatusWithOrphans := v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ { Type: "Succeeded", @@ -291,7 +291,7 @@ metadata: func TestUpdatePipelineRunStatusFromRuns(t *testing.T) { prUID := types.UID("11111111-1111-1111-1111-111111111111") - prRunningStatus := duckv1beta1.Status{ + prRunningStatus := duckv1.Status{ Conditions: []apis.Condition{ { Type: "Succeeded", @@ -545,7 +545,7 @@ func TestUpdatePipelineRunStatusFromChildRefs(t *testing.T) { childRefsPRStatusData := getUpdateStatusChildRefsData(t) - prRunningStatus := duckv1beta1.Status{ + prRunningStatus := duckv1.Status{ Conditions: []apis.Condition{ { Type: "Succeeded", @@ -590,7 +590,7 @@ func TestUpdatePipelineRunStatusFromChildRefs(t *testing.T) { } prStatusWithOrphans := v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ { Type: "Succeeded", @@ -801,7 +801,7 @@ func TestUpdatePipelineRunStatusFromChildObjects(t *testing.T) { childRefsPRStatusData := getUpdateStatusChildRefsData(t) taskRunsPRStatusData := getUpdateStatusTaskRunsData(t) - prRunningStatus := duckv1beta1.Status{ + prRunningStatus := duckv1.Status{ Conditions: []apis.Condition{ { Type: "Succeeded", @@ -813,7 +813,7 @@ func TestUpdatePipelineRunStatusFromChildObjects(t *testing.T) { } prStatusWithOrphans := v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ { Type: "Succeeded", @@ -1161,7 +1161,7 @@ func TestValidateChildObjectsInPipelineRunStatus(t *testing.T) { } } -func prStatusFromInputs(embeddedStatus string, status duckv1beta1.Status, taskRuns map[string]*v1beta1.PipelineRunTaskRunStatus, runs map[string]*v1beta1.PipelineRunRunStatus, childRefs []v1beta1.ChildStatusReference) v1beta1.PipelineRunStatus { +func prStatusFromInputs(embeddedStatus string, status duckv1.Status, taskRuns map[string]*v1beta1.PipelineRunTaskRunStatus, runs map[string]*v1beta1.PipelineRunRunStatus, childRefs []v1beta1.ChildStatusReference) v1beta1.PipelineRunStatus { prs := v1beta1.PipelineRunStatus{ Status: status, PipelineRunStatusFields: v1beta1.PipelineRunStatusFields{}, diff --git a/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go b/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go index 0601929eeb6..4af245bd31a 100644 --- a/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go +++ b/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go @@ -42,7 +42,6 @@ import ( "k8s.io/apimachinery/pkg/selection" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" logtesting "knative.dev/pkg/logging/testing" ) @@ -329,7 +328,7 @@ func makeRetried(tr v1beta1.TaskRun) (newTr *v1beta1.TaskRun) { func withRetries(tr *v1beta1.TaskRun) *v1beta1.TaskRun { tr.Status.RetriesStatus = []v1beta1.TaskRunStatus{{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, @@ -359,7 +358,7 @@ func newTaskRun(tr v1beta1.TaskRun) *v1beta1.TaskRun { }, Spec: tr.Spec, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{Type: apis.ConditionSucceeded}}, }, }, @@ -2910,8 +2909,8 @@ func TestResolvedPipelineRunTask_IsFinallySkipped(t *testing.T) { Name: "dag-task", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{ apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, @@ -3128,7 +3127,7 @@ func TestResolvedPipelineRunTask_IsFinallySkippedByCondition(t *testing.T) { Name: "dag-task", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, @@ -3155,7 +3154,7 @@ func TestResolvedPipelineRunTask_IsFinallySkippedByCondition(t *testing.T) { Name: "final-task", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, @@ -3191,7 +3190,7 @@ func TestResolvedPipelineRunTask_IsFinallySkippedByCondition(t *testing.T) { Name: "final-task", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ /* explicitly empty */ }, }, }, @@ -3255,8 +3254,8 @@ func TestResolvedPipelineRunTask_IsFinalTask(t *testing.T) { Name: "dag-task", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{ apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, diff --git a/pkg/reconciler/pipelinerun/resources/pipelinerunstate_test.go b/pkg/reconciler/pipelinerun/resources/pipelinerunstate_test.go index 427e602a759..52c683f2126 100644 --- a/pkg/reconciler/pipelinerun/resources/pipelinerunstate_test.go +++ b/pkg/reconciler/pipelinerun/resources/pipelinerunstate_test.go @@ -40,7 +40,6 @@ import ( clock "k8s.io/utils/clock/testing" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" ) var now = time.Date(2022, time.January, 1, 0, 0, 0, 0, time.UTC) @@ -1689,7 +1688,7 @@ func TestGetPipelineConditionStatus(t *testing.T) { TaskRunName: "pipelinerun-mytask1", TaskRun: &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, Reason: v1beta1.TaskRunSpecStatusCancelled, @@ -2761,7 +2760,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { }, TaskRun: &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}}, @@ -2783,7 +2782,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { }, TaskRun: &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}}, @@ -2797,7 +2796,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { }, TaskRun: &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}}, @@ -2816,7 +2815,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { }, TaskRun: &v1beta1.TaskRun{ Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, }}}, @@ -2942,7 +2941,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { TypeMeta: metav1.TypeMeta{APIVersion: "tekton.dev/v1beta1"}, ObjectMeta: metav1.ObjectMeta{Name: "matrixed-task-run-0"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, Reason: v1beta1.TaskRunReasonSuccessful.String(), @@ -2952,7 +2951,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { TypeMeta: metav1.TypeMeta{APIVersion: "tekton.dev/v1beta1"}, ObjectMeta: metav1.ObjectMeta{Name: "matrixed-task-run-1"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, Reason: v1beta1.TaskRunReasonSuccessful.String(), @@ -2962,7 +2961,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { TypeMeta: metav1.TypeMeta{APIVersion: "tekton.dev/v1beta1"}, ObjectMeta: metav1.ObjectMeta{Name: "matrixed-task-run-2"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, Reason: v1beta1.TaskRunReasonSuccessful.String(), @@ -2972,7 +2971,7 @@ func TestPipelineRunState_GetResultsFuncs(t *testing.T) { TypeMeta: metav1.TypeMeta{APIVersion: "tekton.dev/v1beta1"}, ObjectMeta: metav1.ObjectMeta{Name: "matrixed-task-run-3"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{Conditions: []apis.Condition{{ + Status: duckv1.Status{Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, Reason: v1beta1.TaskRunReasonSuccessful.String(), diff --git a/pkg/reconciler/pipelinerun/resources/resultrefresolution_test.go b/pkg/reconciler/pipelinerun/resources/resultrefresolution_test.go index 77ff8eaff86..a7c073409aa 100644 --- a/pkg/reconciler/pipelinerun/resources/resultrefresolution_test.go +++ b/pkg/reconciler/pipelinerun/resources/resultrefresolution_test.go @@ -16,7 +16,6 @@ import ( "k8s.io/apimachinery/pkg/selection" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" ) var ( @@ -37,8 +36,8 @@ var pipelineRunState = PipelineRunState{{ Name: "aTaskRun", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ TaskRunResults: []v1beta1.TaskRunResult{{ @@ -127,8 +126,8 @@ var pipelineRunState = PipelineRunState{{ Name: "cTaskRun", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ TaskRunResults: []v1beta1.TaskRunResult{{ @@ -153,8 +152,8 @@ var pipelineRunState = PipelineRunState{{ Name: "dTaskRun", }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ TaskRunResults: []v1beta1.TaskRunResult{{ @@ -205,8 +204,8 @@ func TestTaskParamResolver_ResolveResultRefs(t *testing.T) { TaskRun: &v1beta1.TaskRun{ ObjectMeta: metav1.ObjectMeta{Name: "aTaskRun"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ TaskRunResults: []v1beta1.TaskRunResult{{ @@ -241,8 +240,8 @@ func TestTaskParamResolver_ResolveResultRefs(t *testing.T) { TaskRun: &v1beta1.TaskRun{ ObjectMeta: metav1.ObjectMeta{Name: "aTaskRun"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ TaskRunResults: []v1beta1.TaskRunResult{{ @@ -261,8 +260,8 @@ func TestTaskParamResolver_ResolveResultRefs(t *testing.T) { TaskRun: &v1beta1.TaskRun{ ObjectMeta: metav1.ObjectMeta{Name: "bTaskRun"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ TaskRunResults: []v1beta1.TaskRunResult{{ @@ -304,8 +303,8 @@ func TestTaskParamResolver_ResolveResultRefs(t *testing.T) { TaskRun: &v1beta1.TaskRun{ ObjectMeta: metav1.ObjectMeta{Name: "aTaskRun"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, TaskRunStatusFields: v1beta1.TaskRunStatusFields{ TaskRunResults: []v1beta1.TaskRunResult{{ @@ -340,8 +339,8 @@ func TestTaskParamResolver_ResolveResultRefs(t *testing.T) { TaskRun: &v1beta1.TaskRun{ ObjectMeta: metav1.ObjectMeta{Name: "aTaskRun"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{successCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{successCondition}, }, }, }, @@ -386,8 +385,8 @@ func TestTaskParamResolver_ResolveResultRefs(t *testing.T) { TaskRun: &v1beta1.TaskRun{ ObjectMeta: metav1.ObjectMeta{Name: "aTaskRun"}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{failedCondition}, + Status: duckv1.Status{ + Conditions: duckv1.Conditions{failedCondition}, }, }, }, diff --git a/pkg/reconciler/taskrun/resources/apply_test.go b/pkg/reconciler/taskrun/resources/apply_test.go index 5855a532675..cce3780170f 100644 --- a/pkg/reconciler/taskrun/resources/apply_test.go +++ b/pkg/reconciler/taskrun/resources/apply_test.go @@ -33,7 +33,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" ) var ( @@ -1542,14 +1542,14 @@ func TestContext(t *testing.T) { Status: v1beta1.TaskRunStatus{ TaskRunStatusFields: v1beta1.TaskRunStatusFields{ RetriesStatus: []v1beta1.TaskRunStatus{{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, }, }, { - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, diff --git a/pkg/spire/spire_mock_test.go b/pkg/spire/spire_mock_test.go index 39a82ecc1a0..71ee148bf2e 100644 --- a/pkg/spire/spire_mock_test.go +++ b/pkg/spire/spire_mock_test.go @@ -28,7 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" ) // Simple task run sign/verify @@ -603,8 +603,8 @@ func testTaskRuns() []*v1beta1.TaskRun { Timeout: &metav1.Duration{Duration: config.DefaultTimeoutMinutes * time.Minute}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{ apis.Condition{ Type: apis.ConditionSucceeded, }, @@ -628,8 +628,8 @@ func testTaskRuns() []*v1beta1.TaskRun { Timeout: &metav1.Duration{Duration: config.DefaultTimeoutMinutes * time.Minute}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{ apis.Condition{ Type: apis.ConditionSucceeded, }, diff --git a/pkg/status/status_test.go b/pkg/status/status_test.go index 3f7f5b3d52a..4b0cf932fc6 100644 --- a/pkg/status/status_test.go +++ b/pkg/status/status_test.go @@ -32,7 +32,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" "sigs.k8s.io/yaml" ) @@ -80,8 +79,8 @@ status: PipelineTaskName: "some-task", }, expectedStatus: &v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, diff --git a/pkg/taskrunmetrics/metrics_test.go b/pkg/taskrunmetrics/metrics_test.go index b1a77db3584..2bfb6e76d67 100644 --- a/pkg/taskrunmetrics/metrics_test.go +++ b/pkg/taskrunmetrics/metrics_test.go @@ -33,7 +33,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/metrics/metricstest" _ "knative.dev/pkg/metrics/testing" ) @@ -148,8 +148,8 @@ func TestRecordTaskRunDurationCount(t *testing.T) { TaskRef: &v1beta1.TaskRef{Name: "task-1"}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -181,8 +181,8 @@ func TestRecordTaskRunDurationCount(t *testing.T) { TaskRef: &v1beta1.TaskRef{Name: "task-1"}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -217,8 +217,8 @@ func TestRecordTaskRunDurationCount(t *testing.T) { TaskRef: &v1beta1.TaskRef{Name: "task-1"}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -246,8 +246,8 @@ func TestRecordTaskRunDurationCount(t *testing.T) { TaskRef: &v1beta1.TaskRef{Name: "task-1"}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, @@ -285,8 +285,8 @@ func TestRecordTaskRunDurationCount(t *testing.T) { TaskRef: &v1beta1.TaskRef{Name: "task-1"}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -326,8 +326,8 @@ func TestRecordTaskRunDurationCount(t *testing.T) { TaskRef: &v1beta1.TaskRef{Name: "task-1"}, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, @@ -387,8 +387,8 @@ func TestRecordRunningTaskRunsCount(t *testing.T) { return &v1beta1.TaskRun{ ObjectMeta: metav1.ObjectMeta{Name: names.SimpleNameGenerator.RestrictLengthWithRandomSuffix("taskrun-")}, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{{ Type: apis.ConditionSucceeded, Status: status, }}, @@ -560,8 +560,8 @@ func TestRecordCloudEvents(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{apis.Condition{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, @@ -605,8 +605,8 @@ func TestRecordCloudEvents(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{apis.Condition{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionFalse, }}, @@ -646,8 +646,8 @@ func TestRecordCloudEvents(t *testing.T) { }, }, Status: v1beta1.TaskRunStatus{ - Status: duckv1beta1.Status{ - Conditions: duckv1beta1.Conditions{apis.Condition{ + Status: duckv1.Status{ + Conditions: duckv1.Conditions{apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionTrue, }}, diff --git a/test/custom_task_test.go b/test/custom_task_test.go index ffe1d245ba8..c16df00757a 100644 --- a/test/custom_task_test.go +++ b/test/custom_task_test.go @@ -44,7 +44,6 @@ import ( "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" v1 "knative.dev/pkg/apis/duck/v1" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" knativetest "knative.dev/pkg/test" "knative.dev/pkg/test/helpers" ) @@ -818,7 +817,7 @@ func TestWaitCustomTask_PipelineRun(t *testing.T) { Timeout: tc.prTimeout, }, Status: v1beta1.PipelineRunStatus{ - Status: duckv1beta1.Status{ + Status: duckv1.Status{ Conditions: []apis.Condition{ tc.wantPrCondition, }, diff --git a/test/pipelinefinally_test.go b/test/pipelinefinally_test.go index 44c7dfcd149..d0eeb7ca110 100644 --- a/test/pipelinefinally_test.go +++ b/test/pipelinefinally_test.go @@ -34,7 +34,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" knativetest "knative.dev/pkg/test" "knative.dev/pkg/test/helpers" ) @@ -691,7 +691,7 @@ spec: } } -func isSuccessful(t *testing.T, taskRunName string, conds duckv1beta1.Conditions) bool { +func isSuccessful(t *testing.T, taskRunName string, conds duckv1.Conditions) bool { t.Helper() for _, c := range conds { if c.Type == apis.ConditionSucceeded { @@ -705,7 +705,7 @@ func isSuccessful(t *testing.T, taskRunName string, conds duckv1beta1.Conditions return false } -func isCancelled(t *testing.T, taskRunName string, conds duckv1beta1.Conditions) bool { +func isCancelled(t *testing.T, taskRunName string, conds duckv1.Conditions) bool { t.Helper() for _, c := range conds { if c.Type == apis.ConditionSucceeded { diff --git a/test/propagated_params_test.go b/test/propagated_params_test.go index c77d9ed451c..e47dc1fdf71 100644 --- a/test/propagated_params_test.go +++ b/test/propagated_params_test.go @@ -31,7 +31,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" knativetest "knative.dev/pkg/test" ) @@ -41,7 +41,7 @@ var ( ignoreCondition = cmpopts.IgnoreFields(apis.Condition{}, "LastTransitionTime.Inner.Time", "Message") ignorePipelineRunStatus = cmpopts.IgnoreFields(v1beta1.PipelineRunStatusFields{}, "StartTime", "CompletionTime", "FinallyStartTime", "ChildReferences", "TaskRuns") ignoreTaskRunStatus = cmpopts.IgnoreFields(v1beta1.TaskRunStatusFields{}, "StartTime", "CompletionTime") - ignoreConditions = cmpopts.IgnoreFields(duckv1beta1.Status{}, "Conditions") + ignoreConditions = cmpopts.IgnoreFields(duckv1.Status{}, "Conditions") ignoreContainerStates = cmpopts.IgnoreFields(corev1.ContainerState{}, "Terminated") ignoreStepState = cmpopts.IgnoreFields(v1beta1.StepState{}, "ImageID") ignoreTaskRunSpec = cmpopts.IgnoreFields(v1beta1.TaskRunSpec{}, "Resources") diff --git a/test/retry_test.go b/test/retry_test.go index bc595de4f75..4fe52308803 100644 --- a/test/retry_test.go +++ b/test/retry_test.go @@ -32,7 +32,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" + duckv1 "knative.dev/pkg/apis/duck/v1" knativetest "knative.dev/pkg/test" "knative.dev/pkg/test/helpers" ) @@ -160,7 +160,7 @@ spec: // This method is necessary because PipelineRunTaskRunStatus and TaskRunStatus // don't have an IsFailed method. -func isFailed(t *testing.T, taskRunName string, conds duckv1beta1.Conditions) bool { +func isFailed(t *testing.T, taskRunName string, conds duckv1.Conditions) bool { for _, c := range conds { if c.Type == apis.ConditionSucceeded { if c.Status != corev1.ConditionFalse { diff --git a/third_party/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE b/third_party/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE new file mode 100644 index 00000000000..2441273007b --- /dev/null +++ b/third_party/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2020 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/addressable_types.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/addressable_types.go deleted file mode 100644 index ba7bbc85d8b..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/addressable_types.go +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2019 The Knative Authors - -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. -*/ - -package v1beta1 - -import ( - "context" - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - "knative.dev/pkg/apis" - "knative.dev/pkg/apis/duck/ducktypes" - v1 "knative.dev/pkg/apis/duck/v1" -) - -// +genduck - -// Addressable provides a generic mechanism for a custom resource -// definition to indicate a destination for message delivery. -// -// Addressable is the schema for the destination information. This is -// typically stored in the object's `status`, as this information may -// be generated by the controller. -type Addressable struct { - URL *apis.URL `json:"url,omitempty"` -} - -var ( - // Addressable is a Convertible type. - _ apis.Convertible = (*Addressable)(nil) - - // Addressable is an Implementable "duck type". - _ ducktypes.Implementable = (*Addressable)(nil) -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AddressableType is a skeleton type wrapping Addressable in the manner we expect -// resource writers defining compatible resources to embed it. We will -// typically use this type to deserialize Addressable ObjectReferences and -// access the Addressable data. This is not a real resource. -type AddressableType struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Status AddressStatus `json:"status"` -} - -// AddressStatus shows how we expect folks to embed Addressable in -// their Status field. -type AddressStatus struct { - Address *Addressable `json:"address,omitempty"` -} - -// Verify AddressableType resources meet duck contracts. -var ( - _ apis.Listable = (*AddressableType)(nil) - _ ducktypes.Populatable = (*AddressableType)(nil) -) - -// GetFullType implements duck.Implementable -func (*Addressable) GetFullType() ducktypes.Populatable { - return &AddressableType{} -} - -// ConvertTo implements apis.Convertible -func (a *Addressable) ConvertTo(ctx context.Context, to apis.Convertible) error { - switch sink := to.(type) { - case *v1.Addressable: - sink.URL = a.URL.DeepCopy() - return nil - default: - return fmt.Errorf("unknown version, got: %T", to) - } -} - -// ConvertFrom implements apis.Convertible -func (a *Addressable) ConvertFrom(ctx context.Context, from apis.Convertible) error { - switch source := from.(type) { - case *v1.Addressable: - a.URL = source.URL.DeepCopy() - return nil - default: - return fmt.Errorf("unknown version, got: %T", from) - } -} - -// Populate implements duck.Populatable -func (t *AddressableType) Populate() { - t.Status = AddressStatus{ - &Addressable{ - // Populate ALL fields - URL: &apis.URL{ - Scheme: "http", - Host: "foo.com", - }, - }, - } -} - -// GetListType implements apis.Listable -func (*AddressableType) GetListType() runtime.Object { - return &AddressableTypeList{} -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AddressableTypeList is a list of AddressableType resources -type AddressableTypeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []AddressableType `json:"items"` -} diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/binding_types.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/binding_types.go deleted file mode 100644 index b9e970b3a2c..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/binding_types.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2020 The Knative Authors - -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. -*/ - -package v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - "knative.dev/pkg/apis" - "knative.dev/pkg/apis/duck" - "knative.dev/pkg/tracker" -) - -// +genduck -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Binding is a duck type that specifies the partial schema to which all -// Binding implementations should adhere. -type Binding struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec BindingSpec `json:"spec"` -} - -// Verify that Binding implements the appropriate interfaces. -var ( - _ duck.Implementable = (*Binding)(nil) - _ duck.Populatable = (*Binding)(nil) - _ apis.Listable = (*Binding)(nil) -) - -// BindingSpec specifies the spec portion of the Binding partial-schema. -type BindingSpec struct { - // Subject references the resource(s) whose "runtime contract" should be - // augmented by Binding implementations. - Subject tracker.Reference `json:"subject"` -} - -// GetFullType implements duck.Implementable -func (*Binding) GetFullType() duck.Populatable { - return &Binding{} -} - -// Populate implements duck.Populatable -func (t *Binding) Populate() { - t.Spec = BindingSpec{ - Subject: tracker.Reference{ - APIVersion: "apps/v1", - Kind: "Deployment", - Namespace: "default", - // Name and Selector are mutually exclusive, - // but we fill them both in for this test. - Name: "bazinga", - Selector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "foo": "bar", - "baz": "blah", - }, - }, - }, - } -} - -// GetListType implements apis.Listable -func (*Binding) GetListType() runtime.Object { - return &BindingList{} -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BindingList is a list of Binding resources -type BindingList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Binding `json:"items"` -} diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go deleted file mode 100644 index 4e369b87216..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go +++ /dev/null @@ -1,157 +0,0 @@ -/* -Copyright 2019 The Knative Authors - -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. -*/ - -package v1beta1 - -import ( - "context" - - corev1 "k8s.io/api/core/v1" - "knative.dev/pkg/apis" -) - -// Destination represents a target of an invocation over HTTP. -type Destination struct { - // Ref points to an Addressable. - // +optional - Ref *corev1.ObjectReference `json:"ref,omitempty"` - - // +optional - DeprecatedAPIVersion string `json:"apiVersion,omitempty"` - - // +optional - DeprecatedKind string `json:"kind,omitempty"` - - // +optional - DeprecatedName string `json:"name,omitempty"` - - // +optional - DeprecatedNamespace string `json:"namespace,omitempty"` - - // URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref. - // +optional - URI *apis.URL `json:"uri,omitempty"` -} - -func (dest *Destination) Validate(ctx context.Context) *apis.FieldError { - if dest == nil { - return nil - } - return ValidateDestination(*dest, true).ViaField(apis.CurrentField) -} - -func (dest *Destination) ValidateDisallowDeprecated(ctx context.Context) *apis.FieldError { - if dest == nil { - return nil - } - return ValidateDestination(*dest, false).ViaField(apis.CurrentField) -} - -// ValidateDestination validates Destination and either allows or disallows -// Deprecated* fields depending on the flag. -func ValidateDestination(dest Destination, allowDeprecatedFields bool) *apis.FieldError { - if !allowDeprecatedFields { - var errs *apis.FieldError - if dest.DeprecatedAPIVersion != "" { - errs = errs.Also(apis.ErrInvalidValue("apiVersion is not allowed here, it's a deprecated value", "apiVersion")) - } - if dest.DeprecatedKind != "" { - errs = errs.Also(apis.ErrInvalidValue("kind is not allowed here, it's a deprecated value", "kind")) - } - if dest.DeprecatedName != "" { - errs = errs.Also(apis.ErrInvalidValue("name is not allowed here, it's a deprecated value", "name")) - } - if dest.DeprecatedNamespace != "" { - errs = errs.Also(apis.ErrInvalidValue("namespace is not allowed here, it's a deprecated value", "namespace")) - } - if errs != nil { - return errs - } - } - - deprecatedObjectReference := dest.deprecatedObjectReference() - if dest.Ref != nil && deprecatedObjectReference != nil { - return apis.ErrGeneric("Ref and [apiVersion, kind, name] can't be both present", "[apiVersion, kind, name]", "ref") - } - - var ref *corev1.ObjectReference - if dest.Ref != nil { - ref = dest.Ref - } else { - ref = deprecatedObjectReference - } - if ref == nil && dest.URI == nil { - return apis.ErrGeneric("expected at least one, got none", "[apiVersion, kind, name]", "ref", "uri") - } - - if ref != nil && dest.URI != nil && dest.URI.URL().IsAbs() { - return apis.ErrGeneric("Absolute URI is not allowed when Ref or [apiVersion, kind, name] is present", "[apiVersion, kind, name]", "ref", "uri") - } - // IsAbs() check whether the URL has a non-empty scheme. Besides the non-empty scheme, we also require dest.URI has a non-empty host - if ref == nil && dest.URI != nil && (!dest.URI.URL().IsAbs() || dest.URI.Host == "") { - return apis.ErrInvalidValue("Relative URI is not allowed when Ref and [apiVersion, kind, name] is absent", "uri") - } - if ref != nil && dest.URI == nil { - if dest.Ref != nil { - return validateDestinationRef(*ref).ViaField("ref") - } - return validateDestinationRef(*ref) - } - return nil -} - -func (dest Destination) deprecatedObjectReference() *corev1.ObjectReference { - if dest.DeprecatedAPIVersion == "" && dest.DeprecatedKind == "" && dest.DeprecatedName == "" && dest.DeprecatedNamespace == "" { - return nil - } - return &corev1.ObjectReference{ - Kind: dest.DeprecatedKind, - APIVersion: dest.DeprecatedAPIVersion, - Name: dest.DeprecatedName, - Namespace: dest.DeprecatedNamespace, - } -} - -// GetRef gets the ObjectReference from this Destination, if one is present. If no ref is present, -// then nil is returned. -// Note: this mostly exists to abstract away the deprecated ObjectReference fields. Once they are -// removed, then this method should probably be removed too. -func (dest *Destination) GetRef() *corev1.ObjectReference { - if dest == nil { - return nil - } - if dest.Ref != nil { - return dest.Ref - } - return dest.deprecatedObjectReference() -} - -func validateDestinationRef(ref corev1.ObjectReference) *apis.FieldError { - // Check the object. - var errs *apis.FieldError - // Required Fields - if ref.Name == "" { - errs = errs.Also(apis.ErrMissingField("name")) - } - if ref.APIVersion == "" { - errs = errs.Also(apis.ErrMissingField("apiVersion")) - } - if ref.Kind == "" { - errs = errs.Also(apis.ErrMissingField("kind")) - } - - return errs -} diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/doc.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/doc.go deleted file mode 100644 index 6dbd7ff8aae..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2019 The Knative Authors - -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. -*/ - -// Api versions allow the api contract for a resource to be changed while keeping -// backward compatibility by support multiple concurrent versions -// of the same resource - -// +k8s:deepcopy-gen=package -// +groupName=duck.knative.dev -package v1beta1 diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/register.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/register.go deleted file mode 100644 index 9ac1f16d6ec..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/register.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2019 The Knative Authors - -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. -*/ - -package v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "knative.dev/pkg/apis/duck/ducktypes" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: ducktypes.GroupName, Version: "v1beta1"} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // SchemeBuilder builds a scheme with the types known to the package. - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // AddToScheme adds the types known to this package to an existing schema. - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes( - SchemeGroupVersion, - &KResource{}, - (&KResource{}).GetListType(), - &AddressableType{}, - (&AddressableType{}).GetListType(), - &Binding{}, - (&Binding{}).GetListType(), - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/source_types.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/source_types.go deleted file mode 100644 index 60a502041aa..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/source_types.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright 2019 The Knative Authors - -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. -*/ - -package v1beta1 - -import ( - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - "knative.dev/pkg/apis" - "knative.dev/pkg/apis/duck/ducktypes" -) - -// +genduck -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Source is the minimum resource shape to adhere to the Source Specification. -// This duck type is intended to allow implementors of Sources and -// Importers to verify their own resources meet the expectations. -// This is not a real resource. -// NOTE: The Source Specification is in progress and the shape and names could -// be modified until it has been accepted. -type Source struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec SourceSpec `json:"spec"` - Status SourceStatus `json:"status"` -} - -type SourceSpec struct { - // Sink is a reference to an object that will resolve to a domain name or a - // URI directly to use as the sink. - Sink Destination `json:"sink,omitempty"` - - // CloudEventOverrides defines overrides to control the output format and - // modifications of the event sent to the sink. - // +optional - CloudEventOverrides *CloudEventOverrides `json:"ceOverrides,omitempty"` -} - -// CloudEventOverrides defines arguments for a Source that control the output -// format of the CloudEvents produced by the Source. -type CloudEventOverrides struct { - // Extensions specify what attribute are added or overridden on the - // outbound event. Each `Extensions` key-value pair are set on the event as - // an attribute extension independently. - // +optional - Extensions map[string]string `json:"extensions,omitempty"` -} - -// SourceStatus shows how we expect folks to embed Addressable in -// their Status field. -type SourceStatus struct { - // inherits duck/v1beta1 Status, which currently provides: - // * ObservedGeneration - the 'Generation' of the Service that was last - // processed by the controller. - // * Conditions - the latest available observations of a resource's current - // state. - Status `json:",inline"` - - // SinkURI is the current active sink URI that has been configured for the - // Source. - // +optional - SinkURI *apis.URL `json:"sinkUri,omitempty"` -} - -// IsReady returns true if the resource is ready overall. -func (ss *SourceStatus) IsReady() bool { - for _, c := range ss.Conditions { - switch c.Type { - // Look for the "happy" condition, which is the only condition that - // we can reliably understand to be the overall state of the resource. - case apis.ConditionReady, apis.ConditionSucceeded: - return c.IsTrue() - } - } - return false -} - -// Verify Source resources meet duck contracts. -var ( - _ apis.Listable = (*Source)(nil) - _ ducktypes.Implementable = (*Source)(nil) - _ ducktypes.Populatable = (*Source)(nil) -) - -const ( - // SourceConditionSinkProvided has status True when the Source - // has been configured with a sink target that is resolvable. - SourceConditionSinkProvided apis.ConditionType = "SinkProvided" -) - -// GetFullType implements duck.Implementable -func (*Source) GetFullType() ducktypes.Populatable { - return &Source{} -} - -// Populate implements duck.Populatable -func (s *Source) Populate() { - s.Spec.Sink = Destination{ - URI: &apis.URL{ - Scheme: "https", - Host: "tableflip.dev", - RawQuery: "flip=mattmoor", - }, - } - s.Spec.CloudEventOverrides = &CloudEventOverrides{ - Extensions: map[string]string{"boosh": "kakow"}, - } - s.Status.ObservedGeneration = 42 - s.Status.Conditions = Conditions{{ - // Populate ALL fields - Type: SourceConditionSinkProvided, - Status: corev1.ConditionTrue, - LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))}, - }} - s.Status.SinkURI = &apis.URL{ - Scheme: "https", - Host: "tableflip.dev", - RawQuery: "flip=mattmoor", - } -} - -// GetListType implements apis.Listable -func (*Source) GetListType() runtime.Object { - return &SourceList{} -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SourceList is a list of Source resources -type SourceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []Source `json:"items"` -} diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go deleted file mode 100644 index e1ae875eb45..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright 2019 The Knative Authors - -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. -*/ - -package v1beta1 - -import ( - "context" - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - "knative.dev/pkg/apis" - "knative.dev/pkg/apis/duck/ducktypes" - "knative.dev/pkg/kmap" -) - -// +genduck - -// Conditions is a simple wrapper around apis.Conditions to implement duck.Implementable. -type Conditions apis.Conditions - -// Conditions is an Implementable duck type. -var _ ducktypes.Implementable = (*Conditions)(nil) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KResource is a skeleton type wrapping Conditions in the manner we expect -// resource writers defining compatible resources to embed it. We will -// typically use this type to deserialize Conditions ObjectReferences and -// access the Conditions data. This is not a real resource. -type KResource struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Status Status `json:"status"` -} - -// Status shows how we expect folks to embed Conditions in -// their Status field. -// WARNING: Adding fields to this struct will add them to all Knative resources. -type Status struct { - // ObservedGeneration is the 'Generation' of the Service that - // was last processed by the controller. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // Conditions the latest available observations of a resource's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` - - // Annotations is additional Status fields for the Resource to save some - // additional State as well as convey more information to the user. This is - // roughly akin to Annotations on any k8s resource, just the reconciler conveying - // richer information outwards. - Annotations map[string]string `json:"annotations,omitempty"` -} - -var _ apis.ConditionsAccessor = (*Status)(nil) - -// GetConditions implements apis.ConditionsAccessor -func (s *Status) GetConditions() apis.Conditions { - return apis.Conditions(s.Conditions) -} - -// SetConditions implements apis.ConditionsAccessor -func (s *Status) SetConditions(c apis.Conditions) { - s.Conditions = Conditions(c) -} - -// Verify KResource resources meet duck contracts. -var ( - _ apis.Listable = (*KResource)(nil) - _ ducktypes.Populatable = (*KResource)(nil) -) - -// GetFullType implements duck.Implementable -func (*Conditions) GetFullType() ducktypes.Populatable { - return &KResource{} -} - -// GetCondition fetches the condition of the specified type. -func (s *Status) GetCondition(t apis.ConditionType) *apis.Condition { - for _, cond := range s.Conditions { - if cond.Type == t { - return &cond - } - } - return nil -} - -// ConvertTo helps implement apis.Convertible for types embedding this Status. -func (s *Status) ConvertTo(ctx context.Context, sink *Status) { - sink.ObservedGeneration = s.ObservedGeneration - if s.Annotations != nil { - sink.Annotations = kmap.Copy(s.Annotations) - } - for _, c := range s.Conditions { - switch c.Type { - // Copy over the "happy" condition, which is the only condition that - // we can reliably transfer. - case apis.ConditionReady, apis.ConditionSucceeded: - sink.SetConditions(apis.Conditions{c}) - return - } - } -} - -// Populate implements duck.Populatable -func (t *KResource) Populate() { - t.Status.ObservedGeneration = 42 - t.Status.Conditions = Conditions{{ - // Populate ALL fields - Type: "Birthday", - Status: corev1.ConditionTrue, - LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))}, - Reason: "Celebrate", - Message: "n3wScott, find your party hat :tada:", - }} -} - -// GetListType implements apis.Listable -func (*KResource) GetListType() runtime.Object { - return &KResourceList{} -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KResourceList is a list of KResource resources -type KResourceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []KResource `json:"items"` -} diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 743081b012f..00000000000 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,473 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 2022 The Knative Authors - -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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - apis "knative.dev/pkg/apis" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddressStatus) DeepCopyInto(out *AddressStatus) { - *out = *in - if in.Address != nil { - in, out := &in.Address, &out.Address - *out = new(Addressable) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressStatus. -func (in *AddressStatus) DeepCopy() *AddressStatus { - if in == nil { - return nil - } - out := new(AddressStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Addressable) DeepCopyInto(out *Addressable) { - *out = *in - if in.URL != nil { - in, out := &in.URL, &out.URL - *out = new(apis.URL) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Addressable. -func (in *Addressable) DeepCopy() *Addressable { - if in == nil { - return nil - } - out := new(Addressable) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddressableType) DeepCopyInto(out *AddressableType) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressableType. -func (in *AddressableType) DeepCopy() *AddressableType { - if in == nil { - return nil - } - out := new(AddressableType) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AddressableType) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddressableTypeList) DeepCopyInto(out *AddressableTypeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AddressableType, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressableTypeList. -func (in *AddressableTypeList) DeepCopy() *AddressableTypeList { - if in == nil { - return nil - } - out := new(AddressableTypeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AddressableTypeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Binding) DeepCopyInto(out *Binding) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Binding. -func (in *Binding) DeepCopy() *Binding { - if in == nil { - return nil - } - out := new(Binding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Binding) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BindingList) DeepCopyInto(out *BindingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Binding, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingList. -func (in *BindingList) DeepCopy() *BindingList { - if in == nil { - return nil - } - out := new(BindingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BindingList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BindingSpec) DeepCopyInto(out *BindingSpec) { - *out = *in - in.Subject.DeepCopyInto(&out.Subject) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingSpec. -func (in *BindingSpec) DeepCopy() *BindingSpec { - if in == nil { - return nil - } - out := new(BindingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudEventOverrides) DeepCopyInto(out *CloudEventOverrides) { - *out = *in - if in.Extensions != nil { - in, out := &in.Extensions, &out.Extensions - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudEventOverrides. -func (in *CloudEventOverrides) DeepCopy() *CloudEventOverrides { - if in == nil { - return nil - } - out := new(CloudEventOverrides) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Conditions) DeepCopyInto(out *Conditions) { - { - in := &in - *out = make(Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions. -func (in Conditions) DeepCopy() Conditions { - if in == nil { - return nil - } - out := new(Conditions) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Destination) DeepCopyInto(out *Destination) { - *out = *in - if in.Ref != nil { - in, out := &in.Ref, &out.Ref - *out = new(v1.ObjectReference) - **out = **in - } - if in.URI != nil { - in, out := &in.URI, &out.URI - *out = new(apis.URL) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destination. -func (in *Destination) DeepCopy() *Destination { - if in == nil { - return nil - } - out := new(Destination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KResource) DeepCopyInto(out *KResource) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KResource. -func (in *KResource) DeepCopy() *KResource { - if in == nil { - return nil - } - out := new(KResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KResource) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KResourceList) DeepCopyInto(out *KResourceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KResourceList. -func (in *KResourceList) DeepCopy() *KResourceList { - if in == nil { - return nil - } - out := new(KResourceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KResourceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Source) DeepCopyInto(out *Source) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source. -func (in *Source) DeepCopy() *Source { - if in == nil { - return nil - } - out := new(Source) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Source) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceList) DeepCopyInto(out *SourceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Source, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceList. -func (in *SourceList) DeepCopy() *SourceList { - if in == nil { - return nil - } - out := new(SourceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SourceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceSpec) DeepCopyInto(out *SourceSpec) { - *out = *in - in.Sink.DeepCopyInto(&out.Sink) - if in.CloudEventOverrides != nil { - in, out := &in.CloudEventOverrides, &out.CloudEventOverrides - *out = new(CloudEventOverrides) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceSpec. -func (in *SourceSpec) DeepCopy() *SourceSpec { - if in == nil { - return nil - } - out := new(SourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceStatus) DeepCopyInto(out *SourceStatus) { - *out = *in - in.Status.DeepCopyInto(&out.Status) - if in.SinkURI != nil { - in, out := &in.SinkURI, &out.SinkURI - *out = new(apis.URL) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceStatus. -func (in *SourceStatus) DeepCopy() *SourceStatus { - if in == nil { - return nil - } - out := new(SourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Status) DeepCopyInto(out *Status) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status. -func (in *Status) DeepCopy() *Status { - if in == nil { - return nil - } - out := new(Status) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 1403402db96..f7e145f79ca 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1402,7 +1402,6 @@ knative.dev/pkg/apis knative.dev/pkg/apis/duck knative.dev/pkg/apis/duck/ducktypes knative.dev/pkg/apis/duck/v1 -knative.dev/pkg/apis/duck/v1beta1 knative.dev/pkg/changeset knative.dev/pkg/client/injection/apiextensions/client knative.dev/pkg/client/injection/apiextensions/informers/apiextensions/v1/customresourcedefinition