diff --git a/README.md b/README.md index 10a09739158..c013ab63709 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Tekton Pipelines are **Typed**: - Starting from the v0.33.x release of Tekton: **Kubernetes version 1.21 or later** - Starting from the v0.39.x release of Tekton: **Kubernetes version 1.22 or later** - Starting from the v0.41.x release of Tekton: **Kubernetes version 1.23 or later** +- Starting from the v0.45.x release of Tekton: **Kubernetes version 1.24 or later** ### Read the docs diff --git a/docs/install.md b/docs/install.md index 1f3dbaece3f..f122437478d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -21,7 +21,7 @@ This guide explains how to install Tekton Pipelines. ## Prerequisites -- A [Kubernetes cluster][k8s] running version 1.23 or later. +- A [Kubernetes cluster][k8s] running version 1.24 or later. - [Kubectl][]. - Grant `cluster-admin` privileges to the current user. See the [Kubernetes role-based access control (RBAC) docs][rbac] for more information. diff --git a/docs/pipeline-api.md b/docs/pipeline-api.md index ec558e0fcb9..2297e7bacbc 100644 --- a/docs/pipeline-api.md +++ b/docs/pipeline-api.md @@ -2,7 +2,7 @@ --- title: Pipeline API linkTitle: Pipeline API -weight: 404 +weight: 1000 --- --> @@ -47,7 +47,7 @@ a Tekton resource like a pipeline.yaml.

metadata
- + Kubernetes meta/v1.ObjectMeta @@ -261,7 +261,7 @@ a Tekton resource like a pipeline.yaml.

metadata
- + Kubernetes meta/v1.ObjectMeta @@ -505,7 +505,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -658,7 +658,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -851,7 +851,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -924,7 +924,7 @@ source mounted into /workspace.

volumes
- + []Kubernetes core/v1.Volume @@ -1029,7 +1029,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -1239,7 +1239,7 @@ This field is only supported when the alpha feature gate is enabled.

computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -2223,7 +2223,7 @@ consume these fields via duck typing.

startTime
- + Kubernetes meta/v1.Time @@ -2236,7 +2236,7 @@ Kubernetes meta/v1.Time completionTime
- + Kubernetes meta/v1.Time @@ -2304,7 +2304,7 @@ PipelineSpec finallyStartTime
- + Kubernetes meta/v1.Time @@ -2836,7 +2836,7 @@ PipelineTaskMetadata computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -3010,6 +3010,17 @@ ConfigSource

ConfigSource identifies the source where a resource came from.

+ + +featureFlags
+ +github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags + + + +

FeatureFlags identifies the feature flags that were used during the task/pipeline run

+ +

ResolverName @@ -3256,7 +3267,7 @@ Cannot be updated.

ports
- + []Kubernetes core/v1.ContainerPort @@ -3276,7 +3287,7 @@ Cannot be updated.

envFrom
- + []Kubernetes core/v1.EnvFromSource @@ -3295,7 +3306,7 @@ Cannot be updated.

env
- + []Kubernetes core/v1.EnvVar @@ -3310,7 +3321,7 @@ Cannot be updated.

computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -3326,7 +3337,7 @@ More info: + []Kubernetes core/v1.VolumeMount @@ -3341,7 +3352,7 @@ Cannot be updated.

volumeDevices
- + []Kubernetes core/v1.VolumeDevice @@ -3355,7 +3366,7 @@ Cannot be updated.

livenessProbe
- + Kubernetes core/v1.Probe @@ -3372,7 +3383,7 @@ More info: + Kubernetes core/v1.Probe @@ -3389,7 +3400,7 @@ More info: + Kubernetes core/v1.Probe @@ -3409,7 +3420,7 @@ More info: + Kubernetes core/v1.Lifecycle @@ -3442,7 +3453,7 @@ Cannot be updated.

terminationMessagePolicy
- + Kubernetes core/v1.TerminationMessagePolicy @@ -3462,7 +3473,7 @@ Cannot be updated.

imagePullPolicy
- + Kubernetes core/v1.PullPolicy @@ -3480,7 +3491,7 @@ More info: + Kubernetes core/v1.SecurityContext @@ -3591,7 +3602,7 @@ not have access to it.

ContainerState
- + Kubernetes core/v1.ContainerState @@ -3837,7 +3848,7 @@ Cannot be updated.

envFrom
- + []Kubernetes core/v1.EnvFromSource @@ -3856,7 +3867,7 @@ Cannot be updated.

env
- + []Kubernetes core/v1.EnvVar @@ -3871,7 +3882,7 @@ Cannot be updated.

computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -3887,7 +3898,7 @@ More info: + []Kubernetes core/v1.VolumeMount @@ -3902,7 +3913,7 @@ Cannot be updated.

volumeDevices
- + []Kubernetes core/v1.VolumeDevice @@ -3916,7 +3927,7 @@ Cannot be updated.

imagePullPolicy
- + Kubernetes core/v1.PullPolicy @@ -3934,7 +3945,7 @@ More info: + Kubernetes core/v1.SecurityContext @@ -4087,7 +4098,7 @@ string ContainerState
- + Kubernetes core/v1.ContainerState @@ -4218,7 +4229,7 @@ Cannot be updated.

envFrom
- + []Kubernetes core/v1.EnvFromSource @@ -4237,7 +4248,7 @@ Cannot be updated.

env
- + []Kubernetes core/v1.EnvVar @@ -4252,7 +4263,7 @@ Cannot be updated.

computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -4268,7 +4279,7 @@ More info: + []Kubernetes core/v1.VolumeMount @@ -4283,7 +4294,7 @@ Cannot be updated.

volumeDevices
- + []Kubernetes core/v1.VolumeDevice @@ -4297,7 +4308,7 @@ Cannot be updated.

imagePullPolicy
- + Kubernetes core/v1.PullPolicy @@ -4315,7 +4326,7 @@ More info: + Kubernetes core/v1.SecurityContext @@ -4677,7 +4688,7 @@ string computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -4889,7 +4900,7 @@ This field is only supported when the alpha feature gate is enabled.

computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -5014,7 +5025,7 @@ string startTime
- + Kubernetes meta/v1.Time @@ -5027,7 +5038,7 @@ Kubernetes meta/v1.Time completionTime
- + Kubernetes meta/v1.Time @@ -5153,7 +5164,7 @@ string computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -5227,7 +5238,7 @@ source mounted into /workspace.

volumes
- + []Kubernetes core/v1.Volume @@ -5456,7 +5467,7 @@ for this binding (i.e. the volume will be mounted at this sub directory).

volumeClaimTemplate
- + Kubernetes core/v1.PersistentVolumeClaim @@ -5471,7 +5482,7 @@ The PipelineRun controller is responsible for creating a unique claim for each i persistentVolumeClaim
- + Kubernetes core/v1.PersistentVolumeClaimVolumeSource @@ -5486,7 +5497,7 @@ PersistentVolumeClaim in the same namespace. Either this OR EmptyDir can be used emptyDir
- + Kubernetes core/v1.EmptyDirVolumeSource @@ -5502,7 +5513,7 @@ Either this OR PersistentVolumeClaim can be used.

configMap
- + Kubernetes core/v1.ConfigMapVolumeSource @@ -5516,7 +5527,7 @@ Kubernetes core/v1.ConfigMapVolumeSource secret
- + Kubernetes core/v1.SecretVolumeSource @@ -5530,7 +5541,7 @@ Kubernetes core/v1.SecretVolumeSource projected
- + Kubernetes core/v1.ProjectedVolumeSource @@ -5544,7 +5555,7 @@ Kubernetes core/v1.ProjectedVolumeSource csi
- + Kubernetes core/v1.CSIVolumeSource @@ -5777,7 +5788,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -5994,7 +6005,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -6088,7 +6099,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -6324,7 +6335,7 @@ structs.

secretRef
- + Kubernetes core/v1.SecretReference @@ -6997,7 +7008,7 @@ via duck typing.

startTime
- + Kubernetes meta/v1.Time @@ -7011,7 +7022,7 @@ Kubernetes meta/v1.Time completionTime
- + Kubernetes meta/v1.Time @@ -7119,7 +7130,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -7208,7 +7219,7 @@ source mounted into /workspace.

volumes
- + []Kubernetes core/v1.Volume @@ -7311,7 +7322,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -7509,7 +7520,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -7676,7 +7687,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -7910,7 +7921,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -7999,7 +8010,7 @@ source mounted into /workspace.

volumes
- + []Kubernetes core/v1.Volume @@ -8104,7 +8115,7 @@ string metadata
- + Kubernetes meta/v1.ObjectMeta @@ -8327,7 +8338,7 @@ This field is only supported when the alpha feature gate is enabled.

computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -8491,7 +8502,7 @@ CloudEventCondition sentAt
- + Kubernetes meta/v1.Time @@ -8944,7 +8955,7 @@ TaskSpec volumes
- + []Kubernetes core/v1.Volume @@ -9915,7 +9926,7 @@ consume these fields via duck typing.

startTime
- + Kubernetes meta/v1.Time @@ -9928,7 +9939,7 @@ Kubernetes meta/v1.Time completionTime
- + Kubernetes meta/v1.Time @@ -9996,7 +10007,7 @@ PipelineSpec finallyStartTime
- + Kubernetes meta/v1.Time @@ -10712,7 +10723,7 @@ PipelineTaskMetadata computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -10844,6 +10855,17 @@ ConfigSource

ConfigSource identifies the source where a resource came from.

+ + +featureFlags
+ +github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags + + + +

FeatureFlags identifies the feature flags that were used during the task/pipeline run

+ +

ResolverName @@ -11087,7 +11109,7 @@ Cannot be updated.

ports
- + []Kubernetes core/v1.ContainerPort @@ -11107,7 +11129,7 @@ Cannot be updated.

envFrom
- + []Kubernetes core/v1.EnvFromSource @@ -11126,7 +11148,7 @@ Cannot be updated.

env
- + []Kubernetes core/v1.EnvVar @@ -11141,7 +11163,7 @@ Cannot be updated.

resources
- + Kubernetes core/v1.ResourceRequirements @@ -11157,7 +11179,7 @@ More info: + []Kubernetes core/v1.VolumeMount @@ -11172,7 +11194,7 @@ Cannot be updated.

volumeDevices
- + []Kubernetes core/v1.VolumeDevice @@ -11186,7 +11208,7 @@ Cannot be updated.

livenessProbe
- + Kubernetes core/v1.Probe @@ -11203,7 +11225,7 @@ More info: + Kubernetes core/v1.Probe @@ -11220,7 +11242,7 @@ More info: + Kubernetes core/v1.Probe @@ -11240,7 +11262,7 @@ More info: + Kubernetes core/v1.Lifecycle @@ -11273,7 +11295,7 @@ Cannot be updated.

terminationMessagePolicy
- + Kubernetes core/v1.TerminationMessagePolicy @@ -11293,7 +11315,7 @@ Cannot be updated.

imagePullPolicy
- + Kubernetes core/v1.PullPolicy @@ -11311,7 +11333,7 @@ More info: + Kubernetes core/v1.SecurityContext @@ -11422,7 +11444,7 @@ not have access to it.

ContainerState
- + Kubernetes core/v1.ContainerState @@ -11629,7 +11651,7 @@ Cannot be updated.

ports
- + []Kubernetes core/v1.ContainerPort @@ -11650,7 +11672,7 @@ Cannot be updated.

envFrom
- + []Kubernetes core/v1.EnvFromSource @@ -11669,7 +11691,7 @@ Cannot be updated.

env
- + []Kubernetes core/v1.EnvVar @@ -11684,7 +11706,7 @@ Cannot be updated.

resources
- + Kubernetes core/v1.ResourceRequirements @@ -11700,7 +11722,7 @@ More info: + []Kubernetes core/v1.VolumeMount @@ -11715,7 +11737,7 @@ Cannot be updated.

volumeDevices
- + []Kubernetes core/v1.VolumeDevice @@ -11729,7 +11751,7 @@ Cannot be updated.

livenessProbe
- + Kubernetes core/v1.Probe @@ -11747,7 +11769,7 @@ More info: + Kubernetes core/v1.Probe @@ -11765,7 +11787,7 @@ More info: + Kubernetes core/v1.Probe @@ -11786,7 +11808,7 @@ More info: + Kubernetes core/v1.Lifecycle @@ -11814,7 +11836,7 @@ string terminationMessagePolicy
- + Kubernetes core/v1.TerminationMessagePolicy @@ -11828,7 +11850,7 @@ Kubernetes core/v1.TerminationMessagePolicy imagePullPolicy
- + Kubernetes core/v1.PullPolicy @@ -11846,7 +11868,7 @@ More info: + Kubernetes core/v1.SecurityContext @@ -12047,7 +12069,7 @@ string ContainerState
- + Kubernetes core/v1.ContainerState @@ -12192,7 +12214,7 @@ Cannot be updated.

ports
- + []Kubernetes core/v1.ContainerPort @@ -12213,7 +12235,7 @@ Cannot be updated.

envFrom
- + []Kubernetes core/v1.EnvFromSource @@ -12232,7 +12254,7 @@ Cannot be updated.

env
- + []Kubernetes core/v1.EnvVar @@ -12247,7 +12269,7 @@ Cannot be updated.

resources
- + Kubernetes core/v1.ResourceRequirements @@ -12263,7 +12285,7 @@ More info: + []Kubernetes core/v1.VolumeMount @@ -12278,7 +12300,7 @@ Cannot be updated.

volumeDevices
- + []Kubernetes core/v1.VolumeDevice @@ -12292,7 +12314,7 @@ Cannot be updated.

livenessProbe
- + Kubernetes core/v1.Probe @@ -12310,7 +12332,7 @@ More info: + Kubernetes core/v1.Probe @@ -12328,7 +12350,7 @@ More info: + Kubernetes core/v1.Probe @@ -12349,7 +12371,7 @@ More info: + Kubernetes core/v1.Lifecycle @@ -12377,7 +12399,7 @@ string terminationMessagePolicy
- + Kubernetes core/v1.TerminationMessagePolicy @@ -12391,7 +12413,7 @@ Kubernetes core/v1.TerminationMessagePolicy imagePullPolicy
- + Kubernetes core/v1.PullPolicy @@ -12409,7 +12431,7 @@ More info: + Kubernetes core/v1.SecurityContext @@ -13017,7 +13039,7 @@ string resources
- + Kubernetes core/v1.ResourceRequirements @@ -13242,7 +13264,7 @@ This field is only supported when the alpha feature gate is enabled.

computeResources
- + Kubernetes core/v1.ResourceRequirements @@ -13351,7 +13373,7 @@ string startTime
- + Kubernetes meta/v1.Time @@ -13364,7 +13386,7 @@ Kubernetes meta/v1.Time completionTime
- + Kubernetes meta/v1.Time @@ -13532,7 +13554,7 @@ string resources
- + Kubernetes core/v1.ResourceRequirements @@ -13622,7 +13644,7 @@ source mounted into /workspace.

volumes
- + []Kubernetes core/v1.Volume @@ -13851,7 +13873,7 @@ for this binding (i.e. the volume will be mounted at this sub directory).

volumeClaimTemplate
- + Kubernetes core/v1.PersistentVolumeClaim @@ -13866,7 +13888,7 @@ The PipelineRun controller is responsible for creating a unique claim for each i persistentVolumeClaim
- + Kubernetes core/v1.PersistentVolumeClaimVolumeSource @@ -13881,7 +13903,7 @@ PersistentVolumeClaim in the same namespace. Either this OR EmptyDir can be used emptyDir
- + Kubernetes core/v1.EmptyDirVolumeSource @@ -13897,7 +13919,7 @@ Either this OR PersistentVolumeClaim can be used.

configMap
- + Kubernetes core/v1.ConfigMapVolumeSource @@ -13911,7 +13933,7 @@ Kubernetes core/v1.ConfigMapVolumeSource secret
- + Kubernetes core/v1.SecretVolumeSource @@ -13925,7 +13947,7 @@ Kubernetes core/v1.SecretVolumeSource projected
- + Kubernetes core/v1.ProjectedVolumeSource @@ -13939,7 +13961,7 @@ Kubernetes core/v1.ProjectedVolumeSource csi
- + Kubernetes core/v1.CSIVolumeSource @@ -14236,7 +14258,7 @@ via duck typing.

startTime
- + Kubernetes meta/v1.Time @@ -14250,7 +14272,7 @@ Kubernetes meta/v1.Time completionTime
- + Kubernetes meta/v1.Time diff --git a/go.mod b/go.mod index b65c1181eab..31c7a3c72ac 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( k8s.io/code-generator v0.25.4 k8s.io/klog v1.0.0 k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 - knative.dev/pkg v0.0.0-20221123011842-b78020c16606 + knative.dev/pkg v0.0.0-20230117181655-247510c00e9d sigs.k8s.io/yaml v1.3.0 ) @@ -49,7 +49,7 @@ require ( go.opentelemetry.io/otel/exporters/jaeger v1.12.0 go.opentelemetry.io/otel/sdk v1.13.0 go.opentelemetry.io/otel/trace v1.13.0 - k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85 + k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 ) require ( @@ -114,7 +114,6 @@ require ( github.com/skeema/knownhosts v1.1.0 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/zeebo/errs v1.3.0 // indirect - go.uber.org/goleak v1.2.0 // indirect ) require ( @@ -223,9 +222,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 - k8s.io/apiextensions-apiserver v0.25.2 // indirect - k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7 // indirect - k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/apiextensions-apiserver v0.25.4 // indirect + k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9 // indirect + k8s.io/klog/v2 v2.80.2-0.20221028030830-9ae4992afb54 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/go.sum b/go.sum index 4a8a5e2f54b..c3e9984c496 100644 --- a/go.sum +++ b/go.sum @@ -1183,7 +1183,6 @@ go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= @@ -1752,8 +1751,8 @@ k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.25.4 h1:3YO8J4RtmG7elEgaWMb4HgmpS2CfY1QlaOz9nwB+ZSs= k8s.io/api v0.25.4/go.mod h1:IG2+RzyPQLllQxnhzD8KQNEu4c4YvyDTpSMztf4A0OQ= -k8s.io/apiextensions-apiserver v0.25.2 h1:8uOQX17RE7XL02ngtnh3TgifY7EhekpK+/piwzQNnBo= -k8s.io/apiextensions-apiserver v0.25.2/go.mod h1:iRwwRDlWPfaHhuBfQ0WMa5skdQfrE18QXJaJvIDLvE8= +k8s.io/apiextensions-apiserver v0.25.4 h1:7hu9pF+xikxQuQZ7/30z/qxIPZc2J1lFElPtr7f+B6U= +k8s.io/apiextensions-apiserver v0.25.4/go.mod h1:bkSGki5YBoZWdn5pWtNIdGvDrrsRWlmnvl9a+tAw5vQ= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= @@ -1777,24 +1776,24 @@ k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7 h1:RGb68G3yotdQggcyenx9y0+lnVJCXXcLa6geXOMlf5o= -k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9 h1:iu3o/SxaHVI7tKPtkGzD3M9IzrE21j+CUKH98NQJ8Ms= +k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.80.2-0.20221028030830-9ae4992afb54 h1:hWRbsoRWt44OEBnYUd4ceLy4ofBoh+p9vauWp/I5Gdg= +k8s.io/klog/v2 v2.80.2-0.20221028030830-9ae4992afb54/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85 h1:cTdVh7LYu82xeClmfzGtgyspNh6UxpwLWGi8R4sspNo= -k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/pkg v0.0.0-20221123011842-b78020c16606 h1:bHozIhJtQE9/SVQkVX2vqnoJGJt6zo7J0jnkLFX3Crw= -knative.dev/pkg v0.0.0-20221123011842-b78020c16606/go.mod h1:DMTRDJ5WRxf/DrlOPzohzfhSuJggscLZ8EavOq9O/x8= +k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8= +k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +knative.dev/pkg v0.0.0-20230117181655-247510c00e9d h1:pjKDcvHoMib8nRp56eISRmMj/pFMzJljnzvMvGCIReI= +knative.dev/pkg v0.0.0-20230117181655-247510c00e9d/go.mod h1:VO/fcEsq43seuONRQxZyftWHjpMabYzRHDtpSEQ/eoQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/hack/reference-docs-gen-config.json b/hack/reference-docs-gen-config.json index 42e98d9101a..704066422a7 100644 --- a/hack/reference-docs-gen-config.json +++ b/hack/reference-docs-gen-config.json @@ -13,7 +13,7 @@ }, { "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", - "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" + "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" }, { "typeMatchPrefix": "^knative\\.dev/pkg/apis/duck", diff --git a/hack/update-deps.sh b/hack/update-deps.sh index 3b104f41c4b..8b970cc9fb6 100755 --- a/hack/update-deps.sh +++ b/hack/update-deps.sh @@ -22,12 +22,12 @@ source $(git rev-parse --show-toplevel)/vendor/github.com/tektoncd/plumbing/scri cd ${REPO_ROOT_DIR} -VERSION="release-1.8" +KNATIVE_VERSION="release-1.9" # The list of dependencies that we track at HEAD and periodically # float forward in this repository. FLOATING_DEPS=( - "knative.dev/pkg@${VERSION}" + "knative.dev/pkg@${KNATIVE_VERSION}" ) # Parse flags to determine any we should pass to dep. diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go b/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go index 03f9109c73a..170f6d7f162 100644 --- a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go +++ b/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go @@ -173,19 +173,25 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat pkgNeedsGeneration := (ptagValue == tagValuePackage) if !pkgNeedsGeneration { // If the pkg-scoped tag did not exist, scan all types for one that - // explicitly wants generation. + // explicitly wants generation. Ensure all types that want generation + // can be copied. + var uncopyable []string for _, t := range pkg.Types { klog.V(5).Infof(" considering type %q", t.Name.String()) ttag := extractEnabledTypeTag(t) if ttag != nil && ttag.value == "true" { klog.V(5).Infof(" tag=true") if !copyableType(t) { - klog.Fatalf("Type %v requests deepcopy generation but is not copyable", t) + uncopyable = append(uncopyable, fmt.Sprintf("%v", t)) + } else { + pkgNeedsGeneration = true } - pkgNeedsGeneration = true - break } } + if len(uncopyable) > 0 { + klog.Fatalf("Types requested deepcopy generation but are not copyable: %s", + strings.Join(uncopyable, ", ")) + } } if pkgNeedsGeneration { diff --git a/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go b/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go index 220ec7e0d8a..48566aee542 100644 --- a/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go +++ b/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go @@ -23,6 +23,7 @@ import ( "io" "path/filepath" "reflect" + "regexp" "strconv" "strings" @@ -497,6 +498,23 @@ func mustEnforceDefault(t *types.Type, depth int, omitEmpty bool) (interface{}, } } +var refRE = regexp.MustCompile(`^ref\((?P[^"]+)\)$`) +var refREIdentIndex = refRE.SubexpIndex("reference") + +// parseAsRef looks for strings that match one of the following: +// - ref(Ident) +// - ref(pkgpath.Ident) +// If the input string matches either of these, it will return the (optional) +// pkgpath, the Ident, and true. Otherwise it will return empty strings and +// false. +func parseAsRef(s string) (string, bool) { + matches := refRE.FindStringSubmatch(s) + if len(matches) < refREIdentIndex || matches[refREIdentIndex] == "" { + return "", false + } + return matches[refREIdentIndex], true +} + func populateDefaultValue(node *callNode, t *types.Type, tags string, commentLines []string) *callNode { defaultMap := extractDefaultTag(commentLines) var defaultString string @@ -513,8 +531,12 @@ func populateDefaultValue(node *callNode, t *types.Type, tags string, commentLin } else if len(defaultMap) == 0 { return node } + var symbolReference string var defaultValue interface{} - if err := json.Unmarshal([]byte(defaultString), &defaultValue); err != nil { + if id, ok := parseAsRef(defaultString); ok { + symbolReference = id + defaultString = "" + } else if err := json.Unmarshal([]byte(defaultString), &defaultValue); err != nil { klog.Fatalf("Failed to unmarshal default: %v", err) } @@ -542,7 +564,8 @@ func populateDefaultValue(node *callNode, t *types.Type, tags string, commentLin node.defaultIsPrimitive = t.IsPrimitive() node.defaultType = t.String() - node.defaultValue = defaultString + node.defaultValue.InlineConstant = defaultString + node.defaultValue.SymbolReference = symbolReference node.defaultDepth = depth return node } @@ -668,6 +691,11 @@ const ( conversionPackagePath = "k8s.io/apimachinery/pkg/conversion" ) +type symbolTracker interface { + namer.ImportTracker + AddSymbol(types.Name) +} + // genDefaulter produces a file with a autogenerated conversions. type genDefaulter struct { generator.DefaultGen @@ -676,7 +704,7 @@ type genDefaulter struct { peerPackages []string newDefaulters defaulterFuncMap existingDefaulters defaulterFuncMap - imports namer.ImportTracker + imports symbolTracker typesForInit []*types.Type } @@ -766,6 +794,24 @@ func (g *genDefaulter) GenerateType(c *generator.Context, t *types.Type, w io.Wr } i := 0 callTree.VisitInOrder(func(ancestors []*callNode, current *callNode) { + if len(current.defaultValue.SymbolReference) > 0 { + // If the defaultValue was a reference to a symbol instead of a constant, + // make sure to add it to imports and resolve the name of the symbol + // before generating the defaults. + parsedName := types.ParseFullyQualifiedName(current.defaultValue.SymbolReference) + g.imports.AddSymbol(parsedName) + + // Rewrite the fully qualified name using the local package name + // from the imports + localPackage := g.imports.LocalNameOf(parsedName.Package) + if len(localPackage) > 0 { + current.defaultValue.SymbolReference = localPackage + "." + parsedName.Name + } else { + current.defaultValue.SymbolReference = parsedName.Name + } + + } + if len(current.call) == 0 { return } @@ -795,26 +841,26 @@ func (g *genDefaulter) generateDefaulter(inType *types.Type, callTree *callNode, // how in Go code an access would be performed. For example, if a defaulting function exists on a container // lifecycle hook, to invoke that defaulter correctly would require this Go code: // -// for i := range pod.Spec.Containers { -// o := &pod.Spec.Containers[i] -// if o.LifecycleHook != nil { -// SetDefaults_LifecycleHook(o.LifecycleHook) -// } -// } +// for i := range pod.Spec.Containers { +// o := &pod.Spec.Containers[i] +// if o.LifecycleHook != nil { +// SetDefaults_LifecycleHook(o.LifecycleHook) +// } +// } // // That would be represented by a call tree like: // -// callNode -// field: "Spec" -// children: -// - field: "Containers" -// children: -// - index: true -// children: -// - field: "LifecycleHook" -// elem: true -// call: -// - SetDefaults_LifecycleHook +// callNode +// field: "Spec" +// children: +// - field: "Containers" +// children: +// - index: true +// children: +// - field: "LifecycleHook" +// elem: true +// call: +// - SetDefaults_LifecycleHook // // which we can traverse to build that Go struct (you must call the field Spec, then Containers, then range over // that field, then check whether the LifecycleHook field is nil, before calling SetDefaults_LifecycleHook on @@ -836,7 +882,7 @@ type callNode struct { // defaultValue is the defaultValue of a callNode struct // Only primitive types and pointer types are eligible to have a default value - defaultValue string + defaultValue defaultValue // defaultIsPrimitive is used to determine how to assign the default value. // Primitive types will be directly assigned while complex types will use JSON unmarshalling @@ -862,6 +908,28 @@ type callNode struct { defaultType string } +type defaultValue struct { + // The value was written directly in the marker comment and + // has been parsed as JSON + InlineConstant string + // The name of the symbol relative to the parsed package path + // i.e. k8s.io/pkg.apis.v1.Foo if from another package or simply `Foo` + // if within the same package. + SymbolReference string +} + +func (d defaultValue) IsEmpty() bool { + resolved := d.Resolved() + return resolved == "" +} + +func (d defaultValue) Resolved() string { + if len(d.InlineConstant) > 0 { + return d.InlineConstant + } + return d.SymbolReference +} + // CallNodeVisitorFunc is a function for visiting a call tree. ancestors is the list of all parents // of this node to the root of the tree - will be empty at the root. type CallNodeVisitorFunc func(ancestors []*callNode, node *callNode) @@ -929,11 +997,11 @@ func getTypeZeroValue(t string) (interface{}, error) { } func (n *callNode) writeDefaulter(varName string, index string, isVarPointer bool, sw *generator.SnippetWriter) { - if n.defaultValue == "" { + if n.defaultValue.IsEmpty() { return } args := generator.Args{ - "defaultValue": n.defaultValue, + "defaultValue": n.defaultValue.Resolved(), "varName": varName, "index": index, "varDepth": n.defaultDepth, @@ -1046,7 +1114,7 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode, } sw.Do("}\n", nil) case n.key: - if n.defaultValue != "" { + if !n.defaultValue.IsEmpty() { // Map keys are typed and cannot share the same index variable as arrays and other maps index = index + "_" + ancestors[len(ancestors)-1].field vars["index"] = index diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go b/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go index 5d280dd3734..e9660c2f3a9 100644 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go +++ b/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go @@ -96,15 +96,15 @@ func (s Byte) Clone() Byte { return result } -// Difference returns a set of objects that are not in s2 +// Difference returns a set of objects that are not in s2. // For example: // s1 = {a1, a2, a3} // s2 = {a1, a2, a4, a5} // s1.Difference(s2) = {a3} // s2.Difference(s1) = {a4, a5} -func (s Byte) Difference(s2 Byte) Byte { +func (s1 Byte) Difference(s2 Byte) Byte { result := NewByte() - for key := range s { + for key := range s1 { if !s2.Has(key) { result.Insert(key) } @@ -112,6 +112,16 @@ func (s Byte) Difference(s2 Byte) Byte { return result } +// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.SymmetricDifference(s2) = {a3, a4, a5} +// s2.SymmetricDifference(s1) = {a3, a4, a5} +func (s1 Byte) SymmetricDifference(s2 Byte) Byte { + return s1.Difference(s2).Union(s2.Difference(s1)) +} + // Union returns a new set which includes items in either s1 or s2. // For example: // s1 = {a1, a2} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/int.go b/vendor/k8s.io/gengo/examples/set-gen/sets/int.go index f9a79d98164..f614f06e1f9 100644 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/int.go +++ b/vendor/k8s.io/gengo/examples/set-gen/sets/int.go @@ -96,15 +96,15 @@ func (s Int) Clone() Int { return result } -// Difference returns a set of objects that are not in s2 +// Difference returns a set of objects that are not in s2. // For example: // s1 = {a1, a2, a3} // s2 = {a1, a2, a4, a5} // s1.Difference(s2) = {a3} // s2.Difference(s1) = {a4, a5} -func (s Int) Difference(s2 Int) Int { +func (s1 Int) Difference(s2 Int) Int { result := NewInt() - for key := range s { + for key := range s1 { if !s2.Has(key) { result.Insert(key) } @@ -112,6 +112,16 @@ func (s Int) Difference(s2 Int) Int { return result } +// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.SymmetricDifference(s2) = {a3, a4, a5} +// s2.SymmetricDifference(s1) = {a3, a4, a5} +func (s1 Int) SymmetricDifference(s2 Int) Int { + return s1.Difference(s2).Union(s2.Difference(s1)) +} + // Union returns a new set which includes items in either s1 or s2. // For example: // s1 = {a1, a2} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go b/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go index 03ecb5f1faf..995d99bd90d 100644 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go +++ b/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go @@ -96,15 +96,15 @@ func (s Int64) Clone() Int64 { return result } -// Difference returns a set of objects that are not in s2 +// Difference returns a set of objects that are not in s2. // For example: // s1 = {a1, a2, a3} // s2 = {a1, a2, a4, a5} // s1.Difference(s2) = {a3} // s2.Difference(s1) = {a4, a5} -func (s Int64) Difference(s2 Int64) Int64 { +func (s1 Int64) Difference(s2 Int64) Int64 { result := NewInt64() - for key := range s { + for key := range s1 { if !s2.Has(key) { result.Insert(key) } @@ -112,6 +112,16 @@ func (s Int64) Difference(s2 Int64) Int64 { return result } +// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.SymmetricDifference(s2) = {a3, a4, a5} +// s2.SymmetricDifference(s1) = {a3, a4, a5} +func (s1 Int64) SymmetricDifference(s2 Int64) Int64 { + return s1.Difference(s2).Union(s2.Difference(s1)) +} + // Union returns a new set which includes items in either s1 or s2. // For example: // s1 = {a1, a2} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/string.go b/vendor/k8s.io/gengo/examples/set-gen/sets/string.go index 99b4cab3257..4a4a92fd21f 100644 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/string.go +++ b/vendor/k8s.io/gengo/examples/set-gen/sets/string.go @@ -96,15 +96,15 @@ func (s String) Clone() String { return result } -// Difference returns a set of objects that are not in s2 +// Difference returns a set of objects that are not in s2. // For example: // s1 = {a1, a2, a3} // s2 = {a1, a2, a4, a5} // s1.Difference(s2) = {a3} // s2.Difference(s1) = {a4, a5} -func (s String) Difference(s2 String) String { +func (s1 String) Difference(s2 String) String { result := NewString() - for key := range s { + for key := range s1 { if !s2.Has(key) { result.Insert(key) } @@ -112,6 +112,16 @@ func (s String) Difference(s2 String) String { return result } +// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.SymmetricDifference(s2) = {a3, a4, a5} +// s2.SymmetricDifference(s1) = {a3, a4, a5} +func (s1 String) SymmetricDifference(s2 String) String { + return s1.Difference(s2).Union(s2.Difference(s1)) +} + // Union returns a new set which includes items in either s1 or s2. // For example: // s1 = {a1, a2} diff --git a/vendor/k8s.io/gengo/generator/import_tracker.go b/vendor/k8s.io/gengo/generator/import_tracker.go index 60c899ac464..f7c25a01f27 100644 --- a/vendor/k8s.io/gengo/generator/import_tracker.go +++ b/vendor/k8s.io/gengo/generator/import_tracker.go @@ -26,7 +26,7 @@ import ( "k8s.io/gengo/types" ) -func NewImportTracker(typesToAdd ...*types.Type) namer.ImportTracker { +func NewImportTracker(typesToAdd ...*types.Type) *namer.DefaultImportTracker { tracker := namer.NewDefaultImportTracker(types.Name{}) tracker.IsInvalidType = func(*types.Type) bool { return false } tracker.LocalName = func(name types.Name) string { return golangTrackerLocalName(&tracker, name) } diff --git a/vendor/k8s.io/gengo/namer/import_tracker.go b/vendor/k8s.io/gengo/namer/import_tracker.go index 37094b2deb5..2bf1d503f94 100644 --- a/vendor/k8s.io/gengo/namer/import_tracker.go +++ b/vendor/k8s.io/gengo/namer/import_tracker.go @@ -55,6 +55,27 @@ func (tracker *DefaultImportTracker) AddTypes(types ...*types.Type) { tracker.AddType(t) } } +func (tracker *DefaultImportTracker) AddSymbol(symbol types.Name) { + if tracker.local.Package == symbol.Package { + return + } + + if len(symbol.Package) == 0 { + return + } + path := symbol.Path + if len(path) == 0 { + path = symbol.Package + } + if _, ok := tracker.pathToName[path]; ok { + return + } + + name := tracker.LocalName(symbol) + tracker.nameToPath[name] = path + tracker.pathToName[path] = name +} + func (tracker *DefaultImportTracker) AddType(t *types.Type) { if tracker.local.Package == t.Name.Package { return @@ -70,19 +91,7 @@ func (tracker *DefaultImportTracker) AddType(t *types.Type) { return } - if len(t.Name.Package) == 0 { - return - } - path := t.Name.Path - if len(path) == 0 { - path = t.Name.Package - } - if _, ok := tracker.pathToName[path]; ok { - return - } - name := tracker.LocalName(t.Name) - tracker.nameToPath[name] = path - tracker.pathToName[path] = name + tracker.AddSymbol(t.Name) } func (tracker *DefaultImportTracker) ImportLines() []string { diff --git a/vendor/k8s.io/utils/net/port.go b/vendor/k8s.io/utils/net/port.go index 7ac04f0dc98..c012f8903ca 100644 --- a/vendor/k8s.io/utils/net/port.go +++ b/vendor/k8s.io/utils/net/port.go @@ -29,7 +29,7 @@ type IPFamily string // Constants for valid IPFamilys: const ( IPv4 IPFamily = "4" - IPv6 = "6" + IPv6 IPFamily = "6" ) // Protocol is a network protocol support by LocalPort. diff --git a/vendor/k8s.io/utils/pointer/pointer.go b/vendor/k8s.io/utils/pointer/pointer.go index 638e27d419d..b8103223adc 100644 --- a/vendor/k8s.io/utils/pointer/pointer.go +++ b/vendor/k8s.io/utils/pointer/pointer.go @@ -53,6 +53,7 @@ func Int(i int) *int { } // IntPtr is a function variable referring to Int. +// // Deprecated: Use Int instead. var IntPtr = Int // for back-compat @@ -66,6 +67,7 @@ func IntDeref(ptr *int, def int) int { } // IntPtrDerefOr is a function variable referring to IntDeref. +// // Deprecated: Use IntDeref instead. var IntPtrDerefOr = IntDeref // for back-compat @@ -75,6 +77,7 @@ func Int32(i int32) *int32 { } // Int32Ptr is a function variable referring to Int32. +// // Deprecated: Use Int32 instead. var Int32Ptr = Int32 // for back-compat @@ -88,6 +91,7 @@ func Int32Deref(ptr *int32, def int32) int32 { } // Int32PtrDerefOr is a function variable referring to Int32Deref. +// // Deprecated: Use Int32Deref instead. var Int32PtrDerefOr = Int32Deref // for back-compat @@ -109,6 +113,7 @@ func Uint(i uint) *uint { } // UintPtr is a function variable referring to Uint. +// // Deprecated: Use Uint instead. var UintPtr = Uint // for back-compat @@ -122,6 +127,7 @@ func UintDeref(ptr *uint, def uint) uint { } // UintPtrDerefOr is a function variable referring to UintDeref. +// // Deprecated: Use UintDeref instead. var UintPtrDerefOr = UintDeref // for back-compat @@ -131,6 +137,7 @@ func Uint32(i uint32) *uint32 { } // Uint32Ptr is a function variable referring to Uint32. +// // Deprecated: Use Uint32 instead. var Uint32Ptr = Uint32 // for back-compat @@ -144,6 +151,7 @@ func Uint32Deref(ptr *uint32, def uint32) uint32 { } // Uint32PtrDerefOr is a function variable referring to Uint32Deref. +// // Deprecated: Use Uint32Deref instead. var Uint32PtrDerefOr = Uint32Deref // for back-compat @@ -165,6 +173,7 @@ func Int64(i int64) *int64 { } // Int64Ptr is a function variable referring to Int64. +// // Deprecated: Use Int64 instead. var Int64Ptr = Int64 // for back-compat @@ -178,6 +187,7 @@ func Int64Deref(ptr *int64, def int64) int64 { } // Int64PtrDerefOr is a function variable referring to Int64Deref. +// // Deprecated: Use Int64Deref instead. var Int64PtrDerefOr = Int64Deref // for back-compat @@ -199,6 +209,7 @@ func Uint64(i uint64) *uint64 { } // Uint64Ptr is a function variable referring to Uint64. +// // Deprecated: Use Uint64 instead. var Uint64Ptr = Uint64 // for back-compat @@ -212,6 +223,7 @@ func Uint64Deref(ptr *uint64, def uint64) uint64 { } // Uint64PtrDerefOr is a function variable referring to Uint64Deref. +// // Deprecated: Use Uint64Deref instead. var Uint64PtrDerefOr = Uint64Deref // for back-compat @@ -233,6 +245,7 @@ func Bool(b bool) *bool { } // BoolPtr is a function variable referring to Bool. +// // Deprecated: Use Bool instead. var BoolPtr = Bool // for back-compat @@ -246,6 +259,7 @@ func BoolDeref(ptr *bool, def bool) bool { } // BoolPtrDerefOr is a function variable referring to BoolDeref. +// // Deprecated: Use BoolDeref instead. var BoolPtrDerefOr = BoolDeref // for back-compat @@ -267,6 +281,7 @@ func String(s string) *string { } // StringPtr is a function variable referring to String. +// // Deprecated: Use String instead. var StringPtr = String // for back-compat @@ -280,6 +295,7 @@ func StringDeref(ptr *string, def string) string { } // StringPtrDerefOr is a function variable referring to StringDeref. +// // Deprecated: Use StringDeref instead. var StringPtrDerefOr = StringDeref // for back-compat @@ -301,6 +317,7 @@ func Float32(i float32) *float32 { } // Float32Ptr is a function variable referring to Float32. +// // Deprecated: Use Float32 instead. var Float32Ptr = Float32 @@ -314,6 +331,7 @@ func Float32Deref(ptr *float32, def float32) float32 { } // Float32PtrDerefOr is a function variable referring to Float32Deref. +// // Deprecated: Use Float32Deref instead. var Float32PtrDerefOr = Float32Deref // for back-compat @@ -335,6 +353,7 @@ func Float64(i float64) *float64 { } // Float64Ptr is a function variable referring to Float64. +// // Deprecated: Use Float64 instead. var Float64Ptr = Float64 @@ -348,6 +367,7 @@ func Float64Deref(ptr *float64, def float64) float64 { } // Float64PtrDerefOr is a function variable referring to Float64Deref. +// // Deprecated: Use Float64Deref instead. var Float64PtrDerefOr = Float64Deref // for back-compat diff --git a/vendor/k8s.io/utils/trace/trace.go b/vendor/k8s.io/utils/trace/trace.go index 3023d1066e3..a0b07a6d788 100644 --- a/vendor/k8s.io/utils/trace/trace.go +++ b/vendor/k8s.io/utils/trace/trace.go @@ -21,6 +21,7 @@ import ( "context" "fmt" "math/rand" + "sync" "time" "k8s.io/klog/v2" @@ -93,13 +94,16 @@ func (s traceStep) writeItem(b *bytes.Buffer, formatter string, startTime time.T // Trace keeps track of a set of "steps" and allows us to log a specific // step if it took longer than its share of the total allowed time type Trace struct { + // constant fields name string fields []Field - threshold *time.Duration startTime time.Time - endTime *time.Time - traceItems []traceItem parentTrace *Trace + // fields guarded by a lock + lock sync.RWMutex + threshold *time.Duration + endTime *time.Time + traceItems []traceItem } func (t *Trace) time() time.Time { @@ -138,6 +142,8 @@ func New(name string, fields ...Field) *Trace { // how long it took. The Fields add key value pairs to provide additional details about the trace // step. func (t *Trace) Step(msg string, fields ...Field) { + t.lock.Lock() + defer t.lock.Unlock() if t.traceItems == nil { // traces almost always have less than 6 steps, do this to avoid more than a single allocation t.traceItems = make([]traceItem, 0, 6) @@ -153,7 +159,9 @@ func (t *Trace) Nest(msg string, fields ...Field) *Trace { newTrace := New(msg, fields...) if t != nil { newTrace.parentTrace = t + t.lock.Lock() t.traceItems = append(t.traceItems, newTrace) + t.lock.Unlock() } return newTrace } @@ -163,7 +171,9 @@ func (t *Trace) Nest(msg string, fields ...Field) *Trace { // is logged. func (t *Trace) Log() { endTime := time.Now() + t.lock.Lock() t.endTime = &endTime + t.lock.Unlock() // an explicit logging request should dump all the steps out at the higher level if t.parentTrace == nil { // We don't start logging until Log or LogIfLong is called on the root trace t.logTrace() @@ -178,13 +188,17 @@ func (t *Trace) Log() { // If the Trace is nested it is not immediately logged. Instead, it is logged when the trace it // is nested within is logged. func (t *Trace) LogIfLong(threshold time.Duration) { + t.lock.Lock() t.threshold = &threshold + t.lock.Unlock() t.Log() } // logTopLevelTraces finds all traces in a hierarchy of nested traces that should be logged but do not have any // parents that will be logged, due to threshold limits, and logs them as top level traces. func (t *Trace) logTrace() { + t.lock.RLock() + defer t.lock.RUnlock() if t.durationIsWithinThreshold() { var buffer bytes.Buffer traceNum := rand.Int31() @@ -244,9 +258,13 @@ func (t *Trace) calculateStepThreshold() *time.Duration { traceThreshold := *t.threshold for _, s := range t.traceItems { nestedTrace, ok := s.(*Trace) - if ok && nestedTrace.threshold != nil { - traceThreshold = traceThreshold - *nestedTrace.threshold - lenTrace-- + if ok { + nestedTrace.lock.RLock() + if nestedTrace.threshold != nil { + traceThreshold = traceThreshold - *nestedTrace.threshold + lenTrace-- + } + nestedTrace.lock.RUnlock() } } diff --git a/vendor/knative.dev/pkg/apis/field_error.go b/vendor/knative.dev/pkg/apis/field_error.go index d4773d4aa9d..cacea2f3ce6 100644 --- a/vendor/knative.dev/pkg/apis/field_error.go +++ b/vendor/knative.dev/pkg/apis/field_error.go @@ -256,10 +256,15 @@ func (fe *FieldError) normalized() []*FieldError { return errors } +// WrappedErrors returns the value of the errors after normalizing and deduping using merge(). +func (fe *FieldError) WrappedErrors() []*FieldError { + return merge(fe.normalized()) +} + // Error implements error func (fe *FieldError) Error() string { // Get the list of errors as a flat merged list. - normedErrors := merge(fe.normalized()) + normedErrors := fe.WrappedErrors() errs := make([]string, 0, len(normedErrors)) for _, e := range normedErrors { if e.Details == "" { diff --git a/vendor/knative.dev/pkg/changeset/commit.go b/vendor/knative.dev/pkg/changeset/commit.go index da38bd330dd..90a031f5910 100644 --- a/vendor/knative.dev/pkg/changeset/commit.go +++ b/vendor/knative.dev/pkg/changeset/commit.go @@ -39,7 +39,10 @@ var ( // The result will have a '-dirty' suffix if the workspace was not clean func Get() string { once.Do(func() { - rev = get() + if rev == "" { + rev = get() + } + // It has been set through ldflags, do nothing }) return rev diff --git a/vendor/knative.dev/pkg/client/injection/kube/client/client.go b/vendor/knative.dev/pkg/client/injection/kube/client/client.go index 0111485ca0f..f490241e1d8 100644 --- a/vendor/knative.dev/pkg/client/injection/kube/client/client.go +++ b/vendor/knative.dev/pkg/client/injection/kube/client/client.go @@ -171,6 +171,7 @@ import ( injection "knative.dev/pkg/injection" dynamicclient "knative.dev/pkg/injection/clients/dynamicclient" logging "knative.dev/pkg/logging" + ptr "knative.dev/pkg/ptr" ) func init() { @@ -260,11 +261,43 @@ type wrapAdmissionregistrationV1MutatingWebhookConfigurationImpl struct { var _ typedadmissionregistrationv1.MutatingWebhookConfigurationInterface = (*wrapAdmissionregistrationV1MutatingWebhookConfigurationImpl)(nil) func (w *wrapAdmissionregistrationV1MutatingWebhookConfigurationImpl) Apply(ctx context.Context, in *v1.MutatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("MutatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1.MutatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1MutatingWebhookConfigurationImpl) ApplyStatus(ctx context.Context, in *v1.MutatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("MutatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1.MutatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1MutatingWebhookConfigurationImpl) Create(ctx context.Context, in *admissionregistrationv1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (*admissionregistrationv1.MutatingWebhookConfiguration, error) { @@ -395,11 +428,43 @@ type wrapAdmissionregistrationV1ValidatingWebhookConfigurationImpl struct { var _ typedadmissionregistrationv1.ValidatingWebhookConfigurationInterface = (*wrapAdmissionregistrationV1ValidatingWebhookConfigurationImpl)(nil) func (w *wrapAdmissionregistrationV1ValidatingWebhookConfigurationImpl) Apply(ctx context.Context, in *v1.ValidatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("ValidatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1.ValidatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1ValidatingWebhookConfigurationImpl) ApplyStatus(ctx context.Context, in *v1.ValidatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("ValidatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1.ValidatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1ValidatingWebhookConfigurationImpl) Create(ctx context.Context, in *admissionregistrationv1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (*admissionregistrationv1.ValidatingWebhookConfiguration, error) { @@ -545,11 +610,43 @@ type wrapAdmissionregistrationV1beta1MutatingWebhookConfigurationImpl struct { var _ typedadmissionregistrationv1beta1.MutatingWebhookConfigurationInterface = (*wrapAdmissionregistrationV1beta1MutatingWebhookConfigurationImpl)(nil) func (w *wrapAdmissionregistrationV1beta1MutatingWebhookConfigurationImpl) Apply(ctx context.Context, in *v1beta1.MutatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1beta1.MutatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("MutatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1beta1.MutatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1beta1MutatingWebhookConfigurationImpl) ApplyStatus(ctx context.Context, in *v1beta1.MutatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1beta1.MutatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("MutatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1beta1.MutatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1beta1MutatingWebhookConfigurationImpl) Create(ctx context.Context, in *admissionregistrationv1beta1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (*admissionregistrationv1beta1.MutatingWebhookConfiguration, error) { @@ -680,11 +777,43 @@ type wrapAdmissionregistrationV1beta1ValidatingWebhookConfigurationImpl struct { var _ typedadmissionregistrationv1beta1.ValidatingWebhookConfigurationInterface = (*wrapAdmissionregistrationV1beta1ValidatingWebhookConfigurationImpl)(nil) func (w *wrapAdmissionregistrationV1beta1ValidatingWebhookConfigurationImpl) Apply(ctx context.Context, in *v1beta1.ValidatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1beta1.ValidatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("ValidatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1beta1.ValidatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1beta1ValidatingWebhookConfigurationImpl) ApplyStatus(ctx context.Context, in *v1beta1.ValidatingWebhookConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *admissionregistrationv1beta1.ValidatingWebhookConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("ValidatingWebhookConfiguration") + + in.APIVersion = ptr.String("admissionregistration.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &admissionregistrationv1beta1.ValidatingWebhookConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAdmissionregistrationV1beta1ValidatingWebhookConfigurationImpl) Create(ctx context.Context, in *admissionregistrationv1beta1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (*admissionregistrationv1beta1.ValidatingWebhookConfiguration, error) { @@ -830,11 +959,43 @@ type wrapInternalV1alpha1StorageVersionImpl struct { var _ typedinternalv1alpha1.StorageVersionInterface = (*wrapInternalV1alpha1StorageVersionImpl)(nil) func (w *wrapInternalV1alpha1StorageVersionImpl) Apply(ctx context.Context, in *v1alpha1.StorageVersionApplyConfiguration, opts metav1.ApplyOptions) (result *apiserverinternalv1alpha1.StorageVersion, err error) { - panic("NYI") + in.Kind = ptr.String("StorageVersion") + + in.APIVersion = ptr.String("internal.apiserver.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiserverinternalv1alpha1.StorageVersion{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapInternalV1alpha1StorageVersionImpl) ApplyStatus(ctx context.Context, in *v1alpha1.StorageVersionApplyConfiguration, opts metav1.ApplyOptions) (result *apiserverinternalv1alpha1.StorageVersion, err error) { - panic("NYI") + in.Kind = ptr.String("StorageVersion") + + in.APIVersion = ptr.String("internal.apiserver.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiserverinternalv1alpha1.StorageVersion{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapInternalV1alpha1StorageVersionImpl) Create(ctx context.Context, in *apiserverinternalv1alpha1.StorageVersion, opts metav1.CreateOptions) (*apiserverinternalv1alpha1.StorageVersion, error) { @@ -984,11 +1145,43 @@ type wrapAppsV1ControllerRevisionImpl struct { var _ typedappsv1.ControllerRevisionInterface = (*wrapAppsV1ControllerRevisionImpl)(nil) func (w *wrapAppsV1ControllerRevisionImpl) Apply(ctx context.Context, in *appsv1.ControllerRevisionApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.ControllerRevision, err error) { - panic("NYI") + in.Kind = ptr.String("ControllerRevision") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.ControllerRevision{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1ControllerRevisionImpl) ApplyStatus(ctx context.Context, in *appsv1.ControllerRevisionApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.ControllerRevision, err error) { - panic("NYI") + in.Kind = ptr.String("ControllerRevision") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.ControllerRevision{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1ControllerRevisionImpl) Create(ctx context.Context, in *apiappsv1.ControllerRevision, opts metav1.CreateOptions) (*apiappsv1.ControllerRevision, error) { @@ -1123,11 +1316,43 @@ type wrapAppsV1DaemonSetImpl struct { var _ typedappsv1.DaemonSetInterface = (*wrapAppsV1DaemonSetImpl)(nil) func (w *wrapAppsV1DaemonSetImpl) Apply(ctx context.Context, in *appsv1.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.DaemonSet, err error) { - panic("NYI") + in.Kind = ptr.String("DaemonSet") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.DaemonSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1DaemonSetImpl) ApplyStatus(ctx context.Context, in *appsv1.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.DaemonSet, err error) { - panic("NYI") + in.Kind = ptr.String("DaemonSet") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.DaemonSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1DaemonSetImpl) Create(ctx context.Context, in *apiappsv1.DaemonSet, opts metav1.CreateOptions) (*apiappsv1.DaemonSet, error) { @@ -1262,11 +1487,43 @@ type wrapAppsV1DeploymentImpl struct { var _ typedappsv1.DeploymentInterface = (*wrapAppsV1DeploymentImpl)(nil) func (w *wrapAppsV1DeploymentImpl) Apply(ctx context.Context, in *appsv1.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1DeploymentImpl) ApplyStatus(ctx context.Context, in *appsv1.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1DeploymentImpl) Create(ctx context.Context, in *apiappsv1.Deployment, opts metav1.CreateOptions) (*apiappsv1.Deployment, error) { @@ -1413,24 +1670,15 @@ type wrapAppsV1ReplicaSetImpl struct { var _ typedappsv1.ReplicaSetInterface = (*wrapAppsV1ReplicaSetImpl)(nil) func (w *wrapAppsV1ReplicaSetImpl) Apply(ctx context.Context, in *appsv1.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.ReplicaSet, err error) { - panic("NYI") -} + in.Kind = ptr.String("ReplicaSet") -func (w *wrapAppsV1ReplicaSetImpl) ApplyStatus(ctx context.Context, in *appsv1.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.ReplicaSet, err error) { - panic("NYI") -} + in.APIVersion = ptr.String("apps/v1") -func (w *wrapAppsV1ReplicaSetImpl) Create(ctx context.Context, in *apiappsv1.ReplicaSet, opts metav1.CreateOptions) (*apiappsv1.ReplicaSet, error) { - in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "apps", - Version: "v1", - Kind: "ReplicaSet", - }) uo := &unstructured.Unstructured{} if err := convert(in, uo); err != nil { return nil, err } - uo, err := w.dyn.Namespace(w.namespace).Create(ctx, uo, opts) + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) if err != nil { return nil, err } @@ -1441,9 +1689,50 @@ func (w *wrapAppsV1ReplicaSetImpl) Create(ctx context.Context, in *apiappsv1.Rep return out, nil } -func (w *wrapAppsV1ReplicaSetImpl) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return w.dyn.Namespace(w.namespace).Delete(ctx, name, opts) -} +func (w *wrapAppsV1ReplicaSetImpl) ApplyStatus(ctx context.Context, in *appsv1.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.ReplicaSet, err error) { + in.Kind = ptr.String("ReplicaSet") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.ReplicaSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapAppsV1ReplicaSetImpl) Create(ctx context.Context, in *apiappsv1.ReplicaSet, opts metav1.CreateOptions) (*apiappsv1.ReplicaSet, error) { + in.SetGroupVersionKind(schema.GroupVersionKind{ + Group: "apps", + Version: "v1", + Kind: "ReplicaSet", + }) + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err := w.dyn.Namespace(w.namespace).Create(ctx, uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.ReplicaSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapAppsV1ReplicaSetImpl) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return w.dyn.Namespace(w.namespace).Delete(ctx, name, opts) +} func (w *wrapAppsV1ReplicaSetImpl) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { return w.dyn.Namespace(w.namespace).DeleteCollection(ctx, opts, listOpts) @@ -1564,11 +1853,43 @@ type wrapAppsV1StatefulSetImpl struct { var _ typedappsv1.StatefulSetInterface = (*wrapAppsV1StatefulSetImpl)(nil) func (w *wrapAppsV1StatefulSetImpl) Apply(ctx context.Context, in *appsv1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.StatefulSet, err error) { - panic("NYI") + in.Kind = ptr.String("StatefulSet") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.StatefulSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1StatefulSetImpl) ApplyStatus(ctx context.Context, in *appsv1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1.StatefulSet, err error) { - panic("NYI") + in.Kind = ptr.String("StatefulSet") + + in.APIVersion = ptr.String("apps/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1.StatefulSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1StatefulSetImpl) Create(ctx context.Context, in *apiappsv1.StatefulSet, opts metav1.CreateOptions) (*apiappsv1.StatefulSet, error) { @@ -1730,11 +2051,43 @@ type wrapAppsV1beta1ControllerRevisionImpl struct { var _ typedappsv1beta1.ControllerRevisionInterface = (*wrapAppsV1beta1ControllerRevisionImpl)(nil) func (w *wrapAppsV1beta1ControllerRevisionImpl) Apply(ctx context.Context, in *appsv1beta1.ControllerRevisionApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1beta1.ControllerRevision, err error) { - panic("NYI") + in.Kind = ptr.String("ControllerRevision") + + in.APIVersion = ptr.String("apps/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1beta1.ControllerRevision{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta1ControllerRevisionImpl) ApplyStatus(ctx context.Context, in *appsv1beta1.ControllerRevisionApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1beta1.ControllerRevision, err error) { - panic("NYI") + in.Kind = ptr.String("ControllerRevision") + + in.APIVersion = ptr.String("apps/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1beta1.ControllerRevision{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta1ControllerRevisionImpl) Create(ctx context.Context, in *apiappsv1beta1.ControllerRevision, opts metav1.CreateOptions) (*apiappsv1beta1.ControllerRevision, error) { @@ -1869,11 +2222,43 @@ type wrapAppsV1beta1DeploymentImpl struct { var _ typedappsv1beta1.DeploymentInterface = (*wrapAppsV1beta1DeploymentImpl)(nil) func (w *wrapAppsV1beta1DeploymentImpl) Apply(ctx context.Context, in *appsv1beta1.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1beta1.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("apps/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1beta1.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta1DeploymentImpl) ApplyStatus(ctx context.Context, in *appsv1beta1.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1beta1.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("apps/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1beta1.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta1DeploymentImpl) Create(ctx context.Context, in *apiappsv1beta1.Deployment, opts metav1.CreateOptions) (*apiappsv1beta1.Deployment, error) { @@ -2008,11 +2393,43 @@ type wrapAppsV1beta1StatefulSetImpl struct { var _ typedappsv1beta1.StatefulSetInterface = (*wrapAppsV1beta1StatefulSetImpl)(nil) func (w *wrapAppsV1beta1StatefulSetImpl) Apply(ctx context.Context, in *appsv1beta1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1beta1.StatefulSet, err error) { - panic("NYI") + in.Kind = ptr.String("StatefulSet") + + in.APIVersion = ptr.String("apps/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1beta1.StatefulSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta1StatefulSetImpl) ApplyStatus(ctx context.Context, in *appsv1beta1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiappsv1beta1.StatefulSet, err error) { - panic("NYI") + in.Kind = ptr.String("StatefulSet") + + in.APIVersion = ptr.String("apps/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiappsv1beta1.StatefulSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta1StatefulSetImpl) Create(ctx context.Context, in *apiappsv1beta1.StatefulSet, opts metav1.CreateOptions) (*apiappsv1beta1.StatefulSet, error) { @@ -2162,11 +2579,43 @@ type wrapAppsV1beta2ControllerRevisionImpl struct { var _ typedappsv1beta2.ControllerRevisionInterface = (*wrapAppsV1beta2ControllerRevisionImpl)(nil) func (w *wrapAppsV1beta2ControllerRevisionImpl) Apply(ctx context.Context, in *v1beta2.ControllerRevisionApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.ControllerRevision, err error) { - panic("NYI") + in.Kind = ptr.String("ControllerRevision") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.ControllerRevision{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2ControllerRevisionImpl) ApplyStatus(ctx context.Context, in *v1beta2.ControllerRevisionApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.ControllerRevision, err error) { - panic("NYI") + in.Kind = ptr.String("ControllerRevision") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.ControllerRevision{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2ControllerRevisionImpl) Create(ctx context.Context, in *appsv1beta2.ControllerRevision, opts metav1.CreateOptions) (*appsv1beta2.ControllerRevision, error) { @@ -2301,11 +2750,43 @@ type wrapAppsV1beta2DaemonSetImpl struct { var _ typedappsv1beta2.DaemonSetInterface = (*wrapAppsV1beta2DaemonSetImpl)(nil) func (w *wrapAppsV1beta2DaemonSetImpl) Apply(ctx context.Context, in *v1beta2.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.DaemonSet, err error) { - panic("NYI") + in.Kind = ptr.String("DaemonSet") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.DaemonSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2DaemonSetImpl) ApplyStatus(ctx context.Context, in *v1beta2.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.DaemonSet, err error) { - panic("NYI") + in.Kind = ptr.String("DaemonSet") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.DaemonSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2DaemonSetImpl) Create(ctx context.Context, in *appsv1beta2.DaemonSet, opts metav1.CreateOptions) (*appsv1beta2.DaemonSet, error) { @@ -2440,11 +2921,43 @@ type wrapAppsV1beta2DeploymentImpl struct { var _ typedappsv1beta2.DeploymentInterface = (*wrapAppsV1beta2DeploymentImpl)(nil) func (w *wrapAppsV1beta2DeploymentImpl) Apply(ctx context.Context, in *v1beta2.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2DeploymentImpl) ApplyStatus(ctx context.Context, in *v1beta2.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2DeploymentImpl) Create(ctx context.Context, in *appsv1beta2.Deployment, opts metav1.CreateOptions) (*appsv1beta2.Deployment, error) { @@ -2579,14 +3092,46 @@ type wrapAppsV1beta2ReplicaSetImpl struct { var _ typedappsv1beta2.ReplicaSetInterface = (*wrapAppsV1beta2ReplicaSetImpl)(nil) func (w *wrapAppsV1beta2ReplicaSetImpl) Apply(ctx context.Context, in *v1beta2.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.ReplicaSet, err error) { - panic("NYI") -} + in.Kind = ptr.String("ReplicaSet") -func (w *wrapAppsV1beta2ReplicaSetImpl) ApplyStatus(ctx context.Context, in *v1beta2.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.ReplicaSet, err error) { - panic("NYI") -} + in.APIVersion = ptr.String("apps/v1beta2") -func (w *wrapAppsV1beta2ReplicaSetImpl) Create(ctx context.Context, in *appsv1beta2.ReplicaSet, opts metav1.CreateOptions) (*appsv1beta2.ReplicaSet, error) { + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.ReplicaSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapAppsV1beta2ReplicaSetImpl) ApplyStatus(ctx context.Context, in *v1beta2.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.ReplicaSet, err error) { + in.Kind = ptr.String("ReplicaSet") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.ReplicaSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapAppsV1beta2ReplicaSetImpl) Create(ctx context.Context, in *appsv1beta2.ReplicaSet, opts metav1.CreateOptions) (*appsv1beta2.ReplicaSet, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ Group: "apps", Version: "v1beta2", @@ -2718,11 +3263,43 @@ type wrapAppsV1beta2StatefulSetImpl struct { var _ typedappsv1beta2.StatefulSetInterface = (*wrapAppsV1beta2StatefulSetImpl)(nil) func (w *wrapAppsV1beta2StatefulSetImpl) Apply(ctx context.Context, in *v1beta2.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.StatefulSet, err error) { - panic("NYI") + in.Kind = ptr.String("StatefulSet") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.StatefulSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2StatefulSetImpl) ApplyStatus(ctx context.Context, in *v1beta2.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1beta2.StatefulSet, err error) { - panic("NYI") + in.Kind = ptr.String("StatefulSet") + + in.APIVersion = ptr.String("apps/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &appsv1beta2.StatefulSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAppsV1beta2StatefulSetImpl) Create(ctx context.Context, in *appsv1beta2.StatefulSet, opts metav1.CreateOptions) (*appsv1beta2.StatefulSet, error) { @@ -3322,11 +3899,43 @@ type wrapAutoscalingV1HorizontalPodAutoscalerImpl struct { var _ typedautoscalingv1.HorizontalPodAutoscalerInterface = (*wrapAutoscalingV1HorizontalPodAutoscalerImpl)(nil) func (w *wrapAutoscalingV1HorizontalPodAutoscalerImpl) Apply(ctx context.Context, in *applyconfigurationsautoscalingv1.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv1.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV1HorizontalPodAutoscalerImpl) ApplyStatus(ctx context.Context, in *applyconfigurationsautoscalingv1.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv1.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV1HorizontalPodAutoscalerImpl) Create(ctx context.Context, in *autoscalingv1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*autoscalingv1.HorizontalPodAutoscaler, error) { @@ -3476,11 +4085,43 @@ type wrapAutoscalingV2HorizontalPodAutoscalerImpl struct { var _ typedautoscalingv2.HorizontalPodAutoscalerInterface = (*wrapAutoscalingV2HorizontalPodAutoscalerImpl)(nil) func (w *wrapAutoscalingV2HorizontalPodAutoscalerImpl) Apply(ctx context.Context, in *v2.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv2.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv2.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV2HorizontalPodAutoscalerImpl) ApplyStatus(ctx context.Context, in *v2.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv2.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv2.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV2HorizontalPodAutoscalerImpl) Create(ctx context.Context, in *autoscalingv2.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*autoscalingv2.HorizontalPodAutoscaler, error) { @@ -3630,11 +4271,43 @@ type wrapAutoscalingV2beta1HorizontalPodAutoscalerImpl struct { var _ typedautoscalingv2beta1.HorizontalPodAutoscalerInterface = (*wrapAutoscalingV2beta1HorizontalPodAutoscalerImpl)(nil) func (w *wrapAutoscalingV2beta1HorizontalPodAutoscalerImpl) Apply(ctx context.Context, in *v2beta1.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv2beta1.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v2beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv2beta1.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV2beta1HorizontalPodAutoscalerImpl) ApplyStatus(ctx context.Context, in *v2beta1.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv2beta1.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v2beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv2beta1.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV2beta1HorizontalPodAutoscalerImpl) Create(ctx context.Context, in *autoscalingv2beta1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*autoscalingv2beta1.HorizontalPodAutoscaler, error) { @@ -3784,11 +4457,43 @@ type wrapAutoscalingV2beta2HorizontalPodAutoscalerImpl struct { var _ typedautoscalingv2beta2.HorizontalPodAutoscalerInterface = (*wrapAutoscalingV2beta2HorizontalPodAutoscalerImpl)(nil) func (w *wrapAutoscalingV2beta2HorizontalPodAutoscalerImpl) Apply(ctx context.Context, in *v2beta2.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv2beta2.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v2beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv2beta2.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV2beta2HorizontalPodAutoscalerImpl) ApplyStatus(ctx context.Context, in *v2beta2.HorizontalPodAutoscalerApplyConfiguration, opts metav1.ApplyOptions) (result *autoscalingv2beta2.HorizontalPodAutoscaler, err error) { - panic("NYI") + in.Kind = ptr.String("HorizontalPodAutoscaler") + + in.APIVersion = ptr.String("autoscaling/v2beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &autoscalingv2beta2.HorizontalPodAutoscaler{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapAutoscalingV2beta2HorizontalPodAutoscalerImpl) Create(ctx context.Context, in *autoscalingv2beta2.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*autoscalingv2beta2.HorizontalPodAutoscaler, error) { @@ -3938,11 +4643,43 @@ type wrapBatchV1CronJobImpl struct { var _ typedbatchv1.CronJobInterface = (*wrapBatchV1CronJobImpl)(nil) func (w *wrapBatchV1CronJobImpl) Apply(ctx context.Context, in *batchv1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (result *apibatchv1.CronJob, err error) { - panic("NYI") + in.Kind = ptr.String("CronJob") + + in.APIVersion = ptr.String("batch/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apibatchv1.CronJob{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapBatchV1CronJobImpl) ApplyStatus(ctx context.Context, in *batchv1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (result *apibatchv1.CronJob, err error) { - panic("NYI") + in.Kind = ptr.String("CronJob") + + in.APIVersion = ptr.String("batch/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apibatchv1.CronJob{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapBatchV1CronJobImpl) Create(ctx context.Context, in *apibatchv1.CronJob, opts metav1.CreateOptions) (*apibatchv1.CronJob, error) { @@ -4077,11 +4814,43 @@ type wrapBatchV1JobImpl struct { var _ typedbatchv1.JobInterface = (*wrapBatchV1JobImpl)(nil) func (w *wrapBatchV1JobImpl) Apply(ctx context.Context, in *batchv1.JobApplyConfiguration, opts metav1.ApplyOptions) (result *apibatchv1.Job, err error) { - panic("NYI") + in.Kind = ptr.String("Job") + + in.APIVersion = ptr.String("batch/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apibatchv1.Job{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapBatchV1JobImpl) ApplyStatus(ctx context.Context, in *batchv1.JobApplyConfiguration, opts metav1.ApplyOptions) (result *apibatchv1.Job, err error) { - panic("NYI") + in.Kind = ptr.String("Job") + + in.APIVersion = ptr.String("batch/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apibatchv1.Job{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapBatchV1JobImpl) Create(ctx context.Context, in *apibatchv1.Job, opts metav1.CreateOptions) (*apibatchv1.Job, error) { @@ -4231,24 +5000,15 @@ type wrapBatchV1beta1CronJobImpl struct { var _ typedbatchv1beta1.CronJobInterface = (*wrapBatchV1beta1CronJobImpl)(nil) func (w *wrapBatchV1beta1CronJobImpl) Apply(ctx context.Context, in *batchv1beta1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (result *apibatchv1beta1.CronJob, err error) { - panic("NYI") -} + in.Kind = ptr.String("CronJob") -func (w *wrapBatchV1beta1CronJobImpl) ApplyStatus(ctx context.Context, in *batchv1beta1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (result *apibatchv1beta1.CronJob, err error) { - panic("NYI") -} + in.APIVersion = ptr.String("batch/v1beta1") -func (w *wrapBatchV1beta1CronJobImpl) Create(ctx context.Context, in *apibatchv1beta1.CronJob, opts metav1.CreateOptions) (*apibatchv1beta1.CronJob, error) { - in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "batch", - Version: "v1beta1", - Kind: "CronJob", - }) uo := &unstructured.Unstructured{} if err := convert(in, uo); err != nil { return nil, err } - uo, err := w.dyn.Namespace(w.namespace).Create(ctx, uo, opts) + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) if err != nil { return nil, err } @@ -4259,8 +5019,49 @@ func (w *wrapBatchV1beta1CronJobImpl) Create(ctx context.Context, in *apibatchv1 return out, nil } -func (w *wrapBatchV1beta1CronJobImpl) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return w.dyn.Namespace(w.namespace).Delete(ctx, name, opts) +func (w *wrapBatchV1beta1CronJobImpl) ApplyStatus(ctx context.Context, in *batchv1beta1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (result *apibatchv1beta1.CronJob, err error) { + in.Kind = ptr.String("CronJob") + + in.APIVersion = ptr.String("batch/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apibatchv1beta1.CronJob{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapBatchV1beta1CronJobImpl) Create(ctx context.Context, in *apibatchv1beta1.CronJob, opts metav1.CreateOptions) (*apibatchv1beta1.CronJob, error) { + in.SetGroupVersionKind(schema.GroupVersionKind{ + Group: "batch", + Version: "v1beta1", + Kind: "CronJob", + }) + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err := w.dyn.Namespace(w.namespace).Create(ctx, uo, opts) + if err != nil { + return nil, err + } + out := &apibatchv1beta1.CronJob{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapBatchV1beta1CronJobImpl) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return w.dyn.Namespace(w.namespace).Delete(ctx, name, opts) } func (w *wrapBatchV1beta1CronJobImpl) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { @@ -4381,11 +5182,43 @@ type wrapCertificatesV1CertificateSigningRequestImpl struct { var _ typedcertificatesv1.CertificateSigningRequestInterface = (*wrapCertificatesV1CertificateSigningRequestImpl)(nil) func (w *wrapCertificatesV1CertificateSigningRequestImpl) Apply(ctx context.Context, in *certificatesv1.CertificateSigningRequestApplyConfiguration, opts metav1.ApplyOptions) (result *apicertificatesv1.CertificateSigningRequest, err error) { - panic("NYI") + in.Kind = ptr.String("CertificateSigningRequest") + + in.APIVersion = ptr.String("certificates.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicertificatesv1.CertificateSigningRequest{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCertificatesV1CertificateSigningRequestImpl) ApplyStatus(ctx context.Context, in *certificatesv1.CertificateSigningRequestApplyConfiguration, opts metav1.ApplyOptions) (result *apicertificatesv1.CertificateSigningRequest, err error) { - panic("NYI") + in.Kind = ptr.String("CertificateSigningRequest") + + in.APIVersion = ptr.String("certificates.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicertificatesv1.CertificateSigningRequest{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCertificatesV1CertificateSigningRequestImpl) Create(ctx context.Context, in *apicertificatesv1.CertificateSigningRequest, opts metav1.CreateOptions) (*apicertificatesv1.CertificateSigningRequest, error) { @@ -4535,11 +5368,43 @@ type wrapCertificatesV1beta1CertificateSigningRequestImpl struct { var _ typedcertificatesv1beta1.CertificateSigningRequestInterface = (*wrapCertificatesV1beta1CertificateSigningRequestImpl)(nil) func (w *wrapCertificatesV1beta1CertificateSigningRequestImpl) Apply(ctx context.Context, in *certificatesv1beta1.CertificateSigningRequestApplyConfiguration, opts metav1.ApplyOptions) (result *apicertificatesv1beta1.CertificateSigningRequest, err error) { - panic("NYI") + in.Kind = ptr.String("CertificateSigningRequest") + + in.APIVersion = ptr.String("certificates.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicertificatesv1beta1.CertificateSigningRequest{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCertificatesV1beta1CertificateSigningRequestImpl) ApplyStatus(ctx context.Context, in *certificatesv1beta1.CertificateSigningRequestApplyConfiguration, opts metav1.ApplyOptions) (result *apicertificatesv1beta1.CertificateSigningRequest, err error) { - panic("NYI") + in.Kind = ptr.String("CertificateSigningRequest") + + in.APIVersion = ptr.String("certificates.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicertificatesv1beta1.CertificateSigningRequest{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCertificatesV1beta1CertificateSigningRequestImpl) Create(ctx context.Context, in *apicertificatesv1beta1.CertificateSigningRequest, opts metav1.CreateOptions) (*apicertificatesv1beta1.CertificateSigningRequest, error) { @@ -4689,11 +5554,43 @@ type wrapCoordinationV1LeaseImpl struct { var _ typedcoordinationv1.LeaseInterface = (*wrapCoordinationV1LeaseImpl)(nil) func (w *wrapCoordinationV1LeaseImpl) Apply(ctx context.Context, in *coordinationv1.LeaseApplyConfiguration, opts metav1.ApplyOptions) (result *apicoordinationv1.Lease, err error) { - panic("NYI") + in.Kind = ptr.String("Lease") + + in.APIVersion = ptr.String("coordination.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicoordinationv1.Lease{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoordinationV1LeaseImpl) ApplyStatus(ctx context.Context, in *coordinationv1.LeaseApplyConfiguration, opts metav1.ApplyOptions) (result *apicoordinationv1.Lease, err error) { - panic("NYI") + in.Kind = ptr.String("Lease") + + in.APIVersion = ptr.String("coordination.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicoordinationv1.Lease{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoordinationV1LeaseImpl) Create(ctx context.Context, in *apicoordinationv1.Lease, opts metav1.CreateOptions) (*apicoordinationv1.Lease, error) { @@ -4843,11 +5740,43 @@ type wrapCoordinationV1beta1LeaseImpl struct { var _ typedcoordinationv1beta1.LeaseInterface = (*wrapCoordinationV1beta1LeaseImpl)(nil) func (w *wrapCoordinationV1beta1LeaseImpl) Apply(ctx context.Context, in *coordinationv1beta1.LeaseApplyConfiguration, opts metav1.ApplyOptions) (result *apicoordinationv1beta1.Lease, err error) { - panic("NYI") + in.Kind = ptr.String("Lease") + + in.APIVersion = ptr.String("coordination.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicoordinationv1beta1.Lease{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoordinationV1beta1LeaseImpl) ApplyStatus(ctx context.Context, in *coordinationv1beta1.LeaseApplyConfiguration, opts metav1.ApplyOptions) (result *apicoordinationv1beta1.Lease, err error) { - panic("NYI") + in.Kind = ptr.String("Lease") + + in.APIVersion = ptr.String("coordination.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicoordinationv1beta1.Lease{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoordinationV1beta1LeaseImpl) Create(ctx context.Context, in *apicoordinationv1beta1.Lease, opts metav1.CreateOptions) (*apicoordinationv1beta1.Lease, error) { @@ -4993,11 +5922,43 @@ type wrapCoreV1ComponentStatusImpl struct { var _ typedcorev1.ComponentStatusInterface = (*wrapCoreV1ComponentStatusImpl)(nil) func (w *wrapCoreV1ComponentStatusImpl) Apply(ctx context.Context, in *corev1.ComponentStatusApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ComponentStatus, err error) { - panic("NYI") + in.Kind = ptr.String("ComponentStatus") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ComponentStatus{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ComponentStatusImpl) ApplyStatus(ctx context.Context, in *corev1.ComponentStatusApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ComponentStatus, err error) { - panic("NYI") + in.Kind = ptr.String("ComponentStatus") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ComponentStatus{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ComponentStatusImpl) Create(ctx context.Context, in *apicorev1.ComponentStatus, opts metav1.CreateOptions) (*apicorev1.ComponentStatus, error) { @@ -5132,11 +6093,43 @@ type wrapCoreV1ConfigMapImpl struct { var _ typedcorev1.ConfigMapInterface = (*wrapCoreV1ConfigMapImpl)(nil) func (w *wrapCoreV1ConfigMapImpl) Apply(ctx context.Context, in *corev1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ConfigMap, err error) { - panic("NYI") + in.Kind = ptr.String("ConfigMap") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ConfigMap{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ConfigMapImpl) ApplyStatus(ctx context.Context, in *corev1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ConfigMap, err error) { - panic("NYI") + in.Kind = ptr.String("ConfigMap") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ConfigMap{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ConfigMapImpl) Create(ctx context.Context, in *apicorev1.ConfigMap, opts metav1.CreateOptions) (*apicorev1.ConfigMap, error) { @@ -5271,11 +6264,43 @@ type wrapCoreV1EndpointsImpl struct { var _ typedcorev1.EndpointsInterface = (*wrapCoreV1EndpointsImpl)(nil) func (w *wrapCoreV1EndpointsImpl) Apply(ctx context.Context, in *corev1.EndpointsApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Endpoints, err error) { - panic("NYI") + in.Kind = ptr.String("Endpoints") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Endpoints{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1EndpointsImpl) ApplyStatus(ctx context.Context, in *corev1.EndpointsApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Endpoints, err error) { - panic("NYI") + in.Kind = ptr.String("Endpoints") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Endpoints{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1EndpointsImpl) Create(ctx context.Context, in *apicorev1.Endpoints, opts metav1.CreateOptions) (*apicorev1.Endpoints, error) { @@ -5410,14 +6435,46 @@ type wrapCoreV1EventImpl struct { var _ typedcorev1.EventInterface = (*wrapCoreV1EventImpl)(nil) func (w *wrapCoreV1EventImpl) Apply(ctx context.Context, in *corev1.EventApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Event, err error) { - panic("NYI") -} + in.Kind = ptr.String("Event") -func (w *wrapCoreV1EventImpl) ApplyStatus(ctx context.Context, in *corev1.EventApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Event, err error) { - panic("NYI") -} + in.APIVersion = ptr.String("v1") -func (w *wrapCoreV1EventImpl) Create(ctx context.Context, in *apicorev1.Event, opts metav1.CreateOptions) (*apicorev1.Event, error) { + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Event{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapCoreV1EventImpl) ApplyStatus(ctx context.Context, in *corev1.EventApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Event, err error) { + in.Kind = ptr.String("Event") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Event{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapCoreV1EventImpl) Create(ctx context.Context, in *apicorev1.Event, opts metav1.CreateOptions) (*apicorev1.Event, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ Group: "", Version: "v1", @@ -5549,11 +6606,43 @@ type wrapCoreV1LimitRangeImpl struct { var _ typedcorev1.LimitRangeInterface = (*wrapCoreV1LimitRangeImpl)(nil) func (w *wrapCoreV1LimitRangeImpl) Apply(ctx context.Context, in *corev1.LimitRangeApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.LimitRange, err error) { - panic("NYI") + in.Kind = ptr.String("LimitRange") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.LimitRange{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1LimitRangeImpl) ApplyStatus(ctx context.Context, in *corev1.LimitRangeApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.LimitRange, err error) { - panic("NYI") + in.Kind = ptr.String("LimitRange") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.LimitRange{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1LimitRangeImpl) Create(ctx context.Context, in *apicorev1.LimitRange, opts metav1.CreateOptions) (*apicorev1.LimitRange, error) { @@ -5684,11 +6773,43 @@ type wrapCoreV1NamespaceImpl struct { var _ typedcorev1.NamespaceInterface = (*wrapCoreV1NamespaceImpl)(nil) func (w *wrapCoreV1NamespaceImpl) Apply(ctx context.Context, in *corev1.NamespaceApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Namespace, err error) { - panic("NYI") + in.Kind = ptr.String("Namespace") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Namespace{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1NamespaceImpl) ApplyStatus(ctx context.Context, in *corev1.NamespaceApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Namespace, err error) { - panic("NYI") + in.Kind = ptr.String("Namespace") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Namespace{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1NamespaceImpl) Create(ctx context.Context, in *apicorev1.Namespace, opts metav1.CreateOptions) (*apicorev1.Namespace, error) { @@ -5815,11 +6936,43 @@ type wrapCoreV1NodeImpl struct { var _ typedcorev1.NodeInterface = (*wrapCoreV1NodeImpl)(nil) func (w *wrapCoreV1NodeImpl) Apply(ctx context.Context, in *corev1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Node, err error) { - panic("NYI") + in.Kind = ptr.String("Node") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Node{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1NodeImpl) ApplyStatus(ctx context.Context, in *corev1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Node, err error) { - panic("NYI") + in.Kind = ptr.String("Node") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Node{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1NodeImpl) Create(ctx context.Context, in *apicorev1.Node, opts metav1.CreateOptions) (*apicorev1.Node, error) { @@ -5950,11 +7103,43 @@ type wrapCoreV1PersistentVolumeImpl struct { var _ typedcorev1.PersistentVolumeInterface = (*wrapCoreV1PersistentVolumeImpl)(nil) func (w *wrapCoreV1PersistentVolumeImpl) Apply(ctx context.Context, in *corev1.PersistentVolumeApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.PersistentVolume, err error) { - panic("NYI") + in.Kind = ptr.String("PersistentVolume") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.PersistentVolume{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PersistentVolumeImpl) ApplyStatus(ctx context.Context, in *corev1.PersistentVolumeApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.PersistentVolume, err error) { - panic("NYI") + in.Kind = ptr.String("PersistentVolume") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.PersistentVolume{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PersistentVolumeImpl) Create(ctx context.Context, in *apicorev1.PersistentVolume, opts metav1.CreateOptions) (*apicorev1.PersistentVolume, error) { @@ -6089,11 +7274,43 @@ type wrapCoreV1PersistentVolumeClaimImpl struct { var _ typedcorev1.PersistentVolumeClaimInterface = (*wrapCoreV1PersistentVolumeClaimImpl)(nil) func (w *wrapCoreV1PersistentVolumeClaimImpl) Apply(ctx context.Context, in *corev1.PersistentVolumeClaimApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.PersistentVolumeClaim, err error) { - panic("NYI") + in.Kind = ptr.String("PersistentVolumeClaim") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.PersistentVolumeClaim{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PersistentVolumeClaimImpl) ApplyStatus(ctx context.Context, in *corev1.PersistentVolumeClaimApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.PersistentVolumeClaim, err error) { - panic("NYI") + in.Kind = ptr.String("PersistentVolumeClaim") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.PersistentVolumeClaim{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PersistentVolumeClaimImpl) Create(ctx context.Context, in *apicorev1.PersistentVolumeClaim, opts metav1.CreateOptions) (*apicorev1.PersistentVolumeClaim, error) { @@ -6228,11 +7445,43 @@ type wrapCoreV1PodImpl struct { var _ typedcorev1.PodInterface = (*wrapCoreV1PodImpl)(nil) func (w *wrapCoreV1PodImpl) Apply(ctx context.Context, in *corev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Pod, err error) { - panic("NYI") + in.Kind = ptr.String("Pod") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Pod{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PodImpl) ApplyStatus(ctx context.Context, in *corev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Pod, err error) { - panic("NYI") + in.Kind = ptr.String("Pod") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Pod{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PodImpl) Create(ctx context.Context, in *apicorev1.Pod, opts metav1.CreateOptions) (*apicorev1.Pod, error) { @@ -6371,11 +7620,43 @@ type wrapCoreV1PodTemplateImpl struct { var _ typedcorev1.PodTemplateInterface = (*wrapCoreV1PodTemplateImpl)(nil) func (w *wrapCoreV1PodTemplateImpl) Apply(ctx context.Context, in *corev1.PodTemplateApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.PodTemplate, err error) { - panic("NYI") + in.Kind = ptr.String("PodTemplate") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.PodTemplate{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PodTemplateImpl) ApplyStatus(ctx context.Context, in *corev1.PodTemplateApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.PodTemplate, err error) { - panic("NYI") + in.Kind = ptr.String("PodTemplate") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.PodTemplate{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1PodTemplateImpl) Create(ctx context.Context, in *apicorev1.PodTemplate, opts metav1.CreateOptions) (*apicorev1.PodTemplate, error) { @@ -6510,11 +7791,43 @@ type wrapCoreV1ReplicationControllerImpl struct { var _ typedcorev1.ReplicationControllerInterface = (*wrapCoreV1ReplicationControllerImpl)(nil) func (w *wrapCoreV1ReplicationControllerImpl) Apply(ctx context.Context, in *corev1.ReplicationControllerApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ReplicationController, err error) { - panic("NYI") + in.Kind = ptr.String("ReplicationController") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ReplicationController{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ReplicationControllerImpl) ApplyStatus(ctx context.Context, in *corev1.ReplicationControllerApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ReplicationController, err error) { - panic("NYI") + in.Kind = ptr.String("ReplicationController") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ReplicationController{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ReplicationControllerImpl) Create(ctx context.Context, in *apicorev1.ReplicationController, opts metav1.CreateOptions) (*apicorev1.ReplicationController, error) { @@ -6654,14 +7967,46 @@ type wrapCoreV1ResourceQuotaImpl struct { namespace string } -var _ typedcorev1.ResourceQuotaInterface = (*wrapCoreV1ResourceQuotaImpl)(nil) +var _ typedcorev1.ResourceQuotaInterface = (*wrapCoreV1ResourceQuotaImpl)(nil) + +func (w *wrapCoreV1ResourceQuotaImpl) Apply(ctx context.Context, in *corev1.ResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ResourceQuota, err error) { + in.Kind = ptr.String("ResourceQuota") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ResourceQuota{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapCoreV1ResourceQuotaImpl) ApplyStatus(ctx context.Context, in *corev1.ResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ResourceQuota, err error) { + in.Kind = ptr.String("ResourceQuota") -func (w *wrapCoreV1ResourceQuotaImpl) Apply(ctx context.Context, in *corev1.ResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ResourceQuota, err error) { - panic("NYI") -} + in.APIVersion = ptr.String("v1") -func (w *wrapCoreV1ResourceQuotaImpl) ApplyStatus(ctx context.Context, in *corev1.ResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ResourceQuota, err error) { - panic("NYI") + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ResourceQuota{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ResourceQuotaImpl) Create(ctx context.Context, in *apicorev1.ResourceQuota, opts metav1.CreateOptions) (*apicorev1.ResourceQuota, error) { @@ -6796,11 +8141,43 @@ type wrapCoreV1SecretImpl struct { var _ typedcorev1.SecretInterface = (*wrapCoreV1SecretImpl)(nil) func (w *wrapCoreV1SecretImpl) Apply(ctx context.Context, in *corev1.SecretApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Secret, err error) { - panic("NYI") + in.Kind = ptr.String("Secret") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Secret{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1SecretImpl) ApplyStatus(ctx context.Context, in *corev1.SecretApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Secret, err error) { - panic("NYI") + in.Kind = ptr.String("Secret") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Secret{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1SecretImpl) Create(ctx context.Context, in *apicorev1.Secret, opts metav1.CreateOptions) (*apicorev1.Secret, error) { @@ -6935,11 +8312,43 @@ type wrapCoreV1ServiceImpl struct { var _ typedcorev1.ServiceInterface = (*wrapCoreV1ServiceImpl)(nil) func (w *wrapCoreV1ServiceImpl) Apply(ctx context.Context, in *corev1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Service, err error) { - panic("NYI") + in.Kind = ptr.String("Service") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Service{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ServiceImpl) ApplyStatus(ctx context.Context, in *corev1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.Service, err error) { - panic("NYI") + in.Kind = ptr.String("Service") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.Service{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ServiceImpl) Create(ctx context.Context, in *apicorev1.Service, opts metav1.CreateOptions) (*apicorev1.Service, error) { @@ -7070,11 +8479,43 @@ type wrapCoreV1ServiceAccountImpl struct { var _ typedcorev1.ServiceAccountInterface = (*wrapCoreV1ServiceAccountImpl)(nil) func (w *wrapCoreV1ServiceAccountImpl) Apply(ctx context.Context, in *corev1.ServiceAccountApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ServiceAccount, err error) { - panic("NYI") + in.Kind = ptr.String("ServiceAccount") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ServiceAccount{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ServiceAccountImpl) ApplyStatus(ctx context.Context, in *corev1.ServiceAccountApplyConfiguration, opts metav1.ApplyOptions) (result *apicorev1.ServiceAccount, err error) { - panic("NYI") + in.Kind = ptr.String("ServiceAccount") + + in.APIVersion = ptr.String("v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apicorev1.ServiceAccount{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapCoreV1ServiceAccountImpl) Create(ctx context.Context, in *apicorev1.ServiceAccount, opts metav1.CreateOptions) (*apicorev1.ServiceAccount, error) { @@ -7228,11 +8669,43 @@ type wrapDiscoveryV1EndpointSliceImpl struct { var _ typeddiscoveryv1.EndpointSliceInterface = (*wrapDiscoveryV1EndpointSliceImpl)(nil) func (w *wrapDiscoveryV1EndpointSliceImpl) Apply(ctx context.Context, in *discoveryv1.EndpointSliceApplyConfiguration, opts metav1.ApplyOptions) (result *apidiscoveryv1.EndpointSlice, err error) { - panic("NYI") + in.Kind = ptr.String("EndpointSlice") + + in.APIVersion = ptr.String("discovery.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apidiscoveryv1.EndpointSlice{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapDiscoveryV1EndpointSliceImpl) ApplyStatus(ctx context.Context, in *discoveryv1.EndpointSliceApplyConfiguration, opts metav1.ApplyOptions) (result *apidiscoveryv1.EndpointSlice, err error) { - panic("NYI") + in.Kind = ptr.String("EndpointSlice") + + in.APIVersion = ptr.String("discovery.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apidiscoveryv1.EndpointSlice{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapDiscoveryV1EndpointSliceImpl) Create(ctx context.Context, in *apidiscoveryv1.EndpointSlice, opts metav1.CreateOptions) (*apidiscoveryv1.EndpointSlice, error) { @@ -7382,11 +8855,43 @@ type wrapDiscoveryV1beta1EndpointSliceImpl struct { var _ typeddiscoveryv1beta1.EndpointSliceInterface = (*wrapDiscoveryV1beta1EndpointSliceImpl)(nil) func (w *wrapDiscoveryV1beta1EndpointSliceImpl) Apply(ctx context.Context, in *discoveryv1beta1.EndpointSliceApplyConfiguration, opts metav1.ApplyOptions) (result *apidiscoveryv1beta1.EndpointSlice, err error) { - panic("NYI") + in.Kind = ptr.String("EndpointSlice") + + in.APIVersion = ptr.String("discovery.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apidiscoveryv1beta1.EndpointSlice{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapDiscoveryV1beta1EndpointSliceImpl) ApplyStatus(ctx context.Context, in *discoveryv1beta1.EndpointSliceApplyConfiguration, opts metav1.ApplyOptions) (result *apidiscoveryv1beta1.EndpointSlice, err error) { - panic("NYI") + in.Kind = ptr.String("EndpointSlice") + + in.APIVersion = ptr.String("discovery.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apidiscoveryv1beta1.EndpointSlice{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapDiscoveryV1beta1EndpointSliceImpl) Create(ctx context.Context, in *apidiscoveryv1beta1.EndpointSlice, opts metav1.CreateOptions) (*apidiscoveryv1beta1.EndpointSlice, error) { @@ -7536,11 +9041,43 @@ type wrapEventsV1EventImpl struct { var _ typedeventsv1.EventInterface = (*wrapEventsV1EventImpl)(nil) func (w *wrapEventsV1EventImpl) Apply(ctx context.Context, in *eventsv1.EventApplyConfiguration, opts metav1.ApplyOptions) (result *apieventsv1.Event, err error) { - panic("NYI") + in.Kind = ptr.String("Event") + + in.APIVersion = ptr.String("events.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apieventsv1.Event{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapEventsV1EventImpl) ApplyStatus(ctx context.Context, in *eventsv1.EventApplyConfiguration, opts metav1.ApplyOptions) (result *apieventsv1.Event, err error) { - panic("NYI") + in.Kind = ptr.String("Event") + + in.APIVersion = ptr.String("events.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apieventsv1.Event{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapEventsV1EventImpl) Create(ctx context.Context, in *apieventsv1.Event, opts metav1.CreateOptions) (*apieventsv1.Event, error) { @@ -7690,11 +9227,43 @@ type wrapEventsV1beta1EventImpl struct { var _ typedeventsv1beta1.EventInterface = (*wrapEventsV1beta1EventImpl)(nil) func (w *wrapEventsV1beta1EventImpl) Apply(ctx context.Context, in *eventsv1beta1.EventApplyConfiguration, opts metav1.ApplyOptions) (result *apieventsv1beta1.Event, err error) { - panic("NYI") + in.Kind = ptr.String("Event") + + in.APIVersion = ptr.String("events.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apieventsv1beta1.Event{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapEventsV1beta1EventImpl) ApplyStatus(ctx context.Context, in *eventsv1beta1.EventApplyConfiguration, opts metav1.ApplyOptions) (result *apieventsv1beta1.Event, err error) { - panic("NYI") + in.Kind = ptr.String("Event") + + in.APIVersion = ptr.String("events.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apieventsv1beta1.Event{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapEventsV1beta1EventImpl) Create(ctx context.Context, in *apieventsv1beta1.Event, opts metav1.CreateOptions) (*apieventsv1beta1.Event, error) { @@ -7835,20 +9404,52 @@ func (w *wrapExtensionsV1beta1) DaemonSets(namespace string) typedextensionsv1be } } -type wrapExtensionsV1beta1DaemonSetImpl struct { - dyn dynamic.NamespaceableResourceInterface - - namespace string -} - -var _ typedextensionsv1beta1.DaemonSetInterface = (*wrapExtensionsV1beta1DaemonSetImpl)(nil) +type wrapExtensionsV1beta1DaemonSetImpl struct { + dyn dynamic.NamespaceableResourceInterface + + namespace string +} + +var _ typedextensionsv1beta1.DaemonSetInterface = (*wrapExtensionsV1beta1DaemonSetImpl)(nil) + +func (w *wrapExtensionsV1beta1DaemonSetImpl) Apply(ctx context.Context, in *extensionsv1beta1.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.DaemonSet, err error) { + in.Kind = ptr.String("DaemonSet") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.DaemonSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapExtensionsV1beta1DaemonSetImpl) ApplyStatus(ctx context.Context, in *extensionsv1beta1.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.DaemonSet, err error) { + in.Kind = ptr.String("DaemonSet") -func (w *wrapExtensionsV1beta1DaemonSetImpl) Apply(ctx context.Context, in *extensionsv1beta1.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.DaemonSet, err error) { - panic("NYI") -} + in.APIVersion = ptr.String("extensions/v1beta1") -func (w *wrapExtensionsV1beta1DaemonSetImpl) ApplyStatus(ctx context.Context, in *extensionsv1beta1.DaemonSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.DaemonSet, err error) { - panic("NYI") + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.DaemonSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1DaemonSetImpl) Create(ctx context.Context, in *apiextensionsv1beta1.DaemonSet, opts metav1.CreateOptions) (*apiextensionsv1beta1.DaemonSet, error) { @@ -7983,11 +9584,43 @@ type wrapExtensionsV1beta1DeploymentImpl struct { var _ typedextensionsv1beta1.DeploymentInterface = (*wrapExtensionsV1beta1DeploymentImpl)(nil) func (w *wrapExtensionsV1beta1DeploymentImpl) Apply(ctx context.Context, in *extensionsv1beta1.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1DeploymentImpl) ApplyStatus(ctx context.Context, in *extensionsv1beta1.DeploymentApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.Deployment, err error) { - panic("NYI") + in.Kind = ptr.String("Deployment") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.Deployment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1DeploymentImpl) Create(ctx context.Context, in *apiextensionsv1beta1.Deployment, opts metav1.CreateOptions) (*apiextensionsv1beta1.Deployment, error) { @@ -8134,11 +9767,43 @@ type wrapExtensionsV1beta1IngressImpl struct { var _ typedextensionsv1beta1.IngressInterface = (*wrapExtensionsV1beta1IngressImpl)(nil) func (w *wrapExtensionsV1beta1IngressImpl) Apply(ctx context.Context, in *extensionsv1beta1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.Ingress, err error) { - panic("NYI") + in.Kind = ptr.String("Ingress") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.Ingress{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1IngressImpl) ApplyStatus(ctx context.Context, in *extensionsv1beta1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.Ingress, err error) { - panic("NYI") + in.Kind = ptr.String("Ingress") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.Ingress{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1IngressImpl) Create(ctx context.Context, in *apiextensionsv1beta1.Ingress, opts metav1.CreateOptions) (*apiextensionsv1beta1.Ingress, error) { @@ -8273,11 +9938,43 @@ type wrapExtensionsV1beta1NetworkPolicyImpl struct { var _ typedextensionsv1beta1.NetworkPolicyInterface = (*wrapExtensionsV1beta1NetworkPolicyImpl)(nil) func (w *wrapExtensionsV1beta1NetworkPolicyImpl) Apply(ctx context.Context, in *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.NetworkPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("NetworkPolicy") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.NetworkPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1NetworkPolicyImpl) ApplyStatus(ctx context.Context, in *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.NetworkPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("NetworkPolicy") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.NetworkPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1NetworkPolicyImpl) Create(ctx context.Context, in *apiextensionsv1beta1.NetworkPolicy, opts metav1.CreateOptions) (*apiextensionsv1beta1.NetworkPolicy, error) { @@ -8408,11 +10105,43 @@ type wrapExtensionsV1beta1PodSecurityPolicyImpl struct { var _ typedextensionsv1beta1.PodSecurityPolicyInterface = (*wrapExtensionsV1beta1PodSecurityPolicyImpl)(nil) func (w *wrapExtensionsV1beta1PodSecurityPolicyImpl) Apply(ctx context.Context, in *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.PodSecurityPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("PodSecurityPolicy") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.PodSecurityPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1PodSecurityPolicyImpl) ApplyStatus(ctx context.Context, in *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.PodSecurityPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("PodSecurityPolicy") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.PodSecurityPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1PodSecurityPolicyImpl) Create(ctx context.Context, in *apiextensionsv1beta1.PodSecurityPolicy, opts metav1.CreateOptions) (*apiextensionsv1beta1.PodSecurityPolicy, error) { @@ -8547,11 +10276,43 @@ type wrapExtensionsV1beta1ReplicaSetImpl struct { var _ typedextensionsv1beta1.ReplicaSetInterface = (*wrapExtensionsV1beta1ReplicaSetImpl)(nil) func (w *wrapExtensionsV1beta1ReplicaSetImpl) Apply(ctx context.Context, in *extensionsv1beta1.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.ReplicaSet, err error) { - panic("NYI") + in.Kind = ptr.String("ReplicaSet") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.ReplicaSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1ReplicaSetImpl) ApplyStatus(ctx context.Context, in *extensionsv1beta1.ReplicaSetApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1beta1.ReplicaSet, err error) { - panic("NYI") + in.Kind = ptr.String("ReplicaSet") + + in.APIVersion = ptr.String("extensions/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiextensionsv1beta1.ReplicaSet{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapExtensionsV1beta1ReplicaSetImpl) Create(ctx context.Context, in *apiextensionsv1beta1.ReplicaSet, opts metav1.CreateOptions) (*apiextensionsv1beta1.ReplicaSet, error) { @@ -8709,11 +10470,43 @@ type wrapFlowcontrolV1alpha1FlowSchemaImpl struct { var _ typedflowcontrolv1alpha1.FlowSchemaInterface = (*wrapFlowcontrolV1alpha1FlowSchemaImpl)(nil) func (w *wrapFlowcontrolV1alpha1FlowSchemaImpl) Apply(ctx context.Context, in *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1alpha1.FlowSchema, err error) { - panic("NYI") + in.Kind = ptr.String("FlowSchema") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1alpha1.FlowSchema{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1alpha1FlowSchemaImpl) ApplyStatus(ctx context.Context, in *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1alpha1.FlowSchema, err error) { - panic("NYI") + in.Kind = ptr.String("FlowSchema") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1alpha1.FlowSchema{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1alpha1FlowSchemaImpl) Create(ctx context.Context, in *apiflowcontrolv1alpha1.FlowSchema, opts metav1.CreateOptions) (*apiflowcontrolv1alpha1.FlowSchema, error) { @@ -8844,11 +10637,43 @@ type wrapFlowcontrolV1alpha1PriorityLevelConfigurationImpl struct { var _ typedflowcontrolv1alpha1.PriorityLevelConfigurationInterface = (*wrapFlowcontrolV1alpha1PriorityLevelConfigurationImpl)(nil) func (w *wrapFlowcontrolV1alpha1PriorityLevelConfigurationImpl) Apply(ctx context.Context, in *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1alpha1.PriorityLevelConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityLevelConfiguration") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1alpha1.PriorityLevelConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1alpha1PriorityLevelConfigurationImpl) ApplyStatus(ctx context.Context, in *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1alpha1.PriorityLevelConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityLevelConfiguration") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1alpha1.PriorityLevelConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1alpha1PriorityLevelConfigurationImpl) Create(ctx context.Context, in *apiflowcontrolv1alpha1.PriorityLevelConfiguration, opts metav1.CreateOptions) (*apiflowcontrolv1alpha1.PriorityLevelConfiguration, error) { @@ -8991,14 +10816,46 @@ type wrapFlowcontrolV1beta1FlowSchemaImpl struct { dyn dynamic.NamespaceableResourceInterface } -var _ typedflowcontrolv1beta1.FlowSchemaInterface = (*wrapFlowcontrolV1beta1FlowSchemaImpl)(nil) +var _ typedflowcontrolv1beta1.FlowSchemaInterface = (*wrapFlowcontrolV1beta1FlowSchemaImpl)(nil) + +func (w *wrapFlowcontrolV1beta1FlowSchemaImpl) Apply(ctx context.Context, in *flowcontrolv1beta1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta1.FlowSchema, err error) { + in.Kind = ptr.String("FlowSchema") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta1.FlowSchema{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil +} + +func (w *wrapFlowcontrolV1beta1FlowSchemaImpl) ApplyStatus(ctx context.Context, in *flowcontrolv1beta1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta1.FlowSchema, err error) { + in.Kind = ptr.String("FlowSchema") -func (w *wrapFlowcontrolV1beta1FlowSchemaImpl) Apply(ctx context.Context, in *flowcontrolv1beta1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta1.FlowSchema, err error) { - panic("NYI") -} + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta1") -func (w *wrapFlowcontrolV1beta1FlowSchemaImpl) ApplyStatus(ctx context.Context, in *flowcontrolv1beta1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta1.FlowSchema, err error) { - panic("NYI") + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta1.FlowSchema{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1beta1FlowSchemaImpl) Create(ctx context.Context, in *apiflowcontrolv1beta1.FlowSchema, opts metav1.CreateOptions) (*apiflowcontrolv1beta1.FlowSchema, error) { @@ -9129,11 +10986,43 @@ type wrapFlowcontrolV1beta1PriorityLevelConfigurationImpl struct { var _ typedflowcontrolv1beta1.PriorityLevelConfigurationInterface = (*wrapFlowcontrolV1beta1PriorityLevelConfigurationImpl)(nil) func (w *wrapFlowcontrolV1beta1PriorityLevelConfigurationImpl) Apply(ctx context.Context, in *flowcontrolv1beta1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta1.PriorityLevelConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityLevelConfiguration") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta1.PriorityLevelConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1beta1PriorityLevelConfigurationImpl) ApplyStatus(ctx context.Context, in *flowcontrolv1beta1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta1.PriorityLevelConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityLevelConfiguration") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta1.PriorityLevelConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1beta1PriorityLevelConfigurationImpl) Create(ctx context.Context, in *apiflowcontrolv1beta1.PriorityLevelConfiguration, opts metav1.CreateOptions) (*apiflowcontrolv1beta1.PriorityLevelConfiguration, error) { @@ -9279,11 +11168,43 @@ type wrapFlowcontrolV1beta2FlowSchemaImpl struct { var _ typedflowcontrolv1beta2.FlowSchemaInterface = (*wrapFlowcontrolV1beta2FlowSchemaImpl)(nil) func (w *wrapFlowcontrolV1beta2FlowSchemaImpl) Apply(ctx context.Context, in *flowcontrolv1beta2.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta2.FlowSchema, err error) { - panic("NYI") + in.Kind = ptr.String("FlowSchema") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta2.FlowSchema{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1beta2FlowSchemaImpl) ApplyStatus(ctx context.Context, in *flowcontrolv1beta2.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta2.FlowSchema, err error) { - panic("NYI") + in.Kind = ptr.String("FlowSchema") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta2.FlowSchema{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1beta2FlowSchemaImpl) Create(ctx context.Context, in *apiflowcontrolv1beta2.FlowSchema, opts metav1.CreateOptions) (*apiflowcontrolv1beta2.FlowSchema, error) { @@ -9414,11 +11335,43 @@ type wrapFlowcontrolV1beta2PriorityLevelConfigurationImpl struct { var _ typedflowcontrolv1beta2.PriorityLevelConfigurationInterface = (*wrapFlowcontrolV1beta2PriorityLevelConfigurationImpl)(nil) func (w *wrapFlowcontrolV1beta2PriorityLevelConfigurationImpl) Apply(ctx context.Context, in *flowcontrolv1beta2.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta2.PriorityLevelConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityLevelConfiguration") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta2.PriorityLevelConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1beta2PriorityLevelConfigurationImpl) ApplyStatus(ctx context.Context, in *flowcontrolv1beta2.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *apiflowcontrolv1beta2.PriorityLevelConfiguration, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityLevelConfiguration") + + in.APIVersion = ptr.String("flowcontrol.apiserver.k8s.io/v1beta2") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apiflowcontrolv1beta2.PriorityLevelConfiguration{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapFlowcontrolV1beta2PriorityLevelConfigurationImpl) Create(ctx context.Context, in *apiflowcontrolv1beta2.PriorityLevelConfiguration, opts metav1.CreateOptions) (*apiflowcontrolv1beta2.PriorityLevelConfiguration, error) { @@ -9568,11 +11521,43 @@ type wrapNetworkingV1IngressImpl struct { var _ typednetworkingv1.IngressInterface = (*wrapNetworkingV1IngressImpl)(nil) func (w *wrapNetworkingV1IngressImpl) Apply(ctx context.Context, in *networkingv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1.Ingress, err error) { - panic("NYI") + in.Kind = ptr.String("Ingress") + + in.APIVersion = ptr.String("networking.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1.Ingress{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1IngressImpl) ApplyStatus(ctx context.Context, in *networkingv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1.Ingress, err error) { - panic("NYI") + in.Kind = ptr.String("Ingress") + + in.APIVersion = ptr.String("networking.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1.Ingress{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1IngressImpl) Create(ctx context.Context, in *apinetworkingv1.Ingress, opts metav1.CreateOptions) (*apinetworkingv1.Ingress, error) { @@ -9703,11 +11688,43 @@ type wrapNetworkingV1IngressClassImpl struct { var _ typednetworkingv1.IngressClassInterface = (*wrapNetworkingV1IngressClassImpl)(nil) func (w *wrapNetworkingV1IngressClassImpl) Apply(ctx context.Context, in *networkingv1.IngressClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1.IngressClass, err error) { - panic("NYI") + in.Kind = ptr.String("IngressClass") + + in.APIVersion = ptr.String("networking.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1.IngressClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1IngressClassImpl) ApplyStatus(ctx context.Context, in *networkingv1.IngressClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1.IngressClass, err error) { - panic("NYI") + in.Kind = ptr.String("IngressClass") + + in.APIVersion = ptr.String("networking.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1.IngressClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1IngressClassImpl) Create(ctx context.Context, in *apinetworkingv1.IngressClass, opts metav1.CreateOptions) (*apinetworkingv1.IngressClass, error) { @@ -9842,11 +11859,43 @@ type wrapNetworkingV1NetworkPolicyImpl struct { var _ typednetworkingv1.NetworkPolicyInterface = (*wrapNetworkingV1NetworkPolicyImpl)(nil) func (w *wrapNetworkingV1NetworkPolicyImpl) Apply(ctx context.Context, in *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1.NetworkPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("NetworkPolicy") + + in.APIVersion = ptr.String("networking.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1.NetworkPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1NetworkPolicyImpl) ApplyStatus(ctx context.Context, in *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1.NetworkPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("NetworkPolicy") + + in.APIVersion = ptr.String("networking.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1.NetworkPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1NetworkPolicyImpl) Create(ctx context.Context, in *apinetworkingv1.NetworkPolicy, opts metav1.CreateOptions) (*apinetworkingv1.NetworkPolicy, error) { @@ -9992,11 +12041,43 @@ type wrapNetworkingV1alpha1ClusterCIDRImpl struct { var _ typednetworkingv1alpha1.ClusterCIDRInterface = (*wrapNetworkingV1alpha1ClusterCIDRImpl)(nil) func (w *wrapNetworkingV1alpha1ClusterCIDRImpl) Apply(ctx context.Context, in *networkingv1alpha1.ClusterCIDRApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1alpha1.ClusterCIDR, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterCIDR") + + in.APIVersion = ptr.String("networking.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1alpha1.ClusterCIDR{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1alpha1ClusterCIDRImpl) ApplyStatus(ctx context.Context, in *networkingv1alpha1.ClusterCIDRApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1alpha1.ClusterCIDR, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterCIDR") + + in.APIVersion = ptr.String("networking.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1alpha1.ClusterCIDR{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1alpha1ClusterCIDRImpl) Create(ctx context.Context, in *apinetworkingv1alpha1.ClusterCIDR, opts metav1.CreateOptions) (*apinetworkingv1alpha1.ClusterCIDR, error) { @@ -10146,11 +12227,43 @@ type wrapNetworkingV1beta1IngressImpl struct { var _ typednetworkingv1beta1.IngressInterface = (*wrapNetworkingV1beta1IngressImpl)(nil) func (w *wrapNetworkingV1beta1IngressImpl) Apply(ctx context.Context, in *networkingv1beta1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1beta1.Ingress, err error) { - panic("NYI") + in.Kind = ptr.String("Ingress") + + in.APIVersion = ptr.String("networking.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1beta1.Ingress{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1beta1IngressImpl) ApplyStatus(ctx context.Context, in *networkingv1beta1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1beta1.Ingress, err error) { - panic("NYI") + in.Kind = ptr.String("Ingress") + + in.APIVersion = ptr.String("networking.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1beta1.Ingress{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1beta1IngressImpl) Create(ctx context.Context, in *apinetworkingv1beta1.Ingress, opts metav1.CreateOptions) (*apinetworkingv1beta1.Ingress, error) { @@ -10281,11 +12394,43 @@ type wrapNetworkingV1beta1IngressClassImpl struct { var _ typednetworkingv1beta1.IngressClassInterface = (*wrapNetworkingV1beta1IngressClassImpl)(nil) func (w *wrapNetworkingV1beta1IngressClassImpl) Apply(ctx context.Context, in *networkingv1beta1.IngressClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1beta1.IngressClass, err error) { - panic("NYI") + in.Kind = ptr.String("IngressClass") + + in.APIVersion = ptr.String("networking.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1beta1.IngressClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1beta1IngressClassImpl) ApplyStatus(ctx context.Context, in *networkingv1beta1.IngressClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinetworkingv1beta1.IngressClass, err error) { - panic("NYI") + in.Kind = ptr.String("IngressClass") + + in.APIVersion = ptr.String("networking.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinetworkingv1beta1.IngressClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNetworkingV1beta1IngressClassImpl) Create(ctx context.Context, in *apinetworkingv1beta1.IngressClass, opts metav1.CreateOptions) (*apinetworkingv1beta1.IngressClass, error) { @@ -10431,11 +12576,43 @@ type wrapNodeV1RuntimeClassImpl struct { var _ typednodev1.RuntimeClassInterface = (*wrapNodeV1RuntimeClassImpl)(nil) func (w *wrapNodeV1RuntimeClassImpl) Apply(ctx context.Context, in *nodev1.RuntimeClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinodev1.RuntimeClass, err error) { - panic("NYI") + in.Kind = ptr.String("RuntimeClass") + + in.APIVersion = ptr.String("node.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinodev1.RuntimeClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNodeV1RuntimeClassImpl) ApplyStatus(ctx context.Context, in *nodev1.RuntimeClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinodev1.RuntimeClass, err error) { - panic("NYI") + in.Kind = ptr.String("RuntimeClass") + + in.APIVersion = ptr.String("node.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinodev1.RuntimeClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNodeV1RuntimeClassImpl) Create(ctx context.Context, in *apinodev1.RuntimeClass, opts metav1.CreateOptions) (*apinodev1.RuntimeClass, error) { @@ -10581,11 +12758,43 @@ type wrapNodeV1alpha1RuntimeClassImpl struct { var _ typednodev1alpha1.RuntimeClassInterface = (*wrapNodeV1alpha1RuntimeClassImpl)(nil) func (w *wrapNodeV1alpha1RuntimeClassImpl) Apply(ctx context.Context, in *nodev1alpha1.RuntimeClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinodev1alpha1.RuntimeClass, err error) { - panic("NYI") + in.Kind = ptr.String("RuntimeClass") + + in.APIVersion = ptr.String("node.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinodev1alpha1.RuntimeClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNodeV1alpha1RuntimeClassImpl) ApplyStatus(ctx context.Context, in *nodev1alpha1.RuntimeClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinodev1alpha1.RuntimeClass, err error) { - panic("NYI") + in.Kind = ptr.String("RuntimeClass") + + in.APIVersion = ptr.String("node.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinodev1alpha1.RuntimeClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNodeV1alpha1RuntimeClassImpl) Create(ctx context.Context, in *apinodev1alpha1.RuntimeClass, opts metav1.CreateOptions) (*apinodev1alpha1.RuntimeClass, error) { @@ -10731,11 +12940,43 @@ type wrapNodeV1beta1RuntimeClassImpl struct { var _ typednodev1beta1.RuntimeClassInterface = (*wrapNodeV1beta1RuntimeClassImpl)(nil) func (w *wrapNodeV1beta1RuntimeClassImpl) Apply(ctx context.Context, in *nodev1beta1.RuntimeClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinodev1beta1.RuntimeClass, err error) { - panic("NYI") + in.Kind = ptr.String("RuntimeClass") + + in.APIVersion = ptr.String("node.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinodev1beta1.RuntimeClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNodeV1beta1RuntimeClassImpl) ApplyStatus(ctx context.Context, in *nodev1beta1.RuntimeClassApplyConfiguration, opts metav1.ApplyOptions) (result *apinodev1beta1.RuntimeClass, err error) { - panic("NYI") + in.Kind = ptr.String("RuntimeClass") + + in.APIVersion = ptr.String("node.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apinodev1beta1.RuntimeClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapNodeV1beta1RuntimeClassImpl) Create(ctx context.Context, in *apinodev1beta1.RuntimeClass, opts metav1.CreateOptions) (*apinodev1beta1.RuntimeClass, error) { @@ -10905,11 +13146,43 @@ type wrapPolicyV1PodDisruptionBudgetImpl struct { var _ typedpolicyv1.PodDisruptionBudgetInterface = (*wrapPolicyV1PodDisruptionBudgetImpl)(nil) func (w *wrapPolicyV1PodDisruptionBudgetImpl) Apply(ctx context.Context, in *policyv1.PodDisruptionBudgetApplyConfiguration, opts metav1.ApplyOptions) (result *apipolicyv1.PodDisruptionBudget, err error) { - panic("NYI") + in.Kind = ptr.String("PodDisruptionBudget") + + in.APIVersion = ptr.String("policy/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apipolicyv1.PodDisruptionBudget{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapPolicyV1PodDisruptionBudgetImpl) ApplyStatus(ctx context.Context, in *policyv1.PodDisruptionBudgetApplyConfiguration, opts metav1.ApplyOptions) (result *apipolicyv1.PodDisruptionBudget, err error) { - panic("NYI") + in.Kind = ptr.String("PodDisruptionBudget") + + in.APIVersion = ptr.String("policy/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apipolicyv1.PodDisruptionBudget{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapPolicyV1PodDisruptionBudgetImpl) Create(ctx context.Context, in *apipolicyv1.PodDisruptionBudget, opts metav1.CreateOptions) (*apipolicyv1.PodDisruptionBudget, error) { @@ -11079,11 +13352,43 @@ type wrapPolicyV1beta1PodDisruptionBudgetImpl struct { var _ typedpolicyv1beta1.PodDisruptionBudgetInterface = (*wrapPolicyV1beta1PodDisruptionBudgetImpl)(nil) func (w *wrapPolicyV1beta1PodDisruptionBudgetImpl) Apply(ctx context.Context, in *policyv1beta1.PodDisruptionBudgetApplyConfiguration, opts metav1.ApplyOptions) (result *apipolicyv1beta1.PodDisruptionBudget, err error) { - panic("NYI") + in.Kind = ptr.String("PodDisruptionBudget") + + in.APIVersion = ptr.String("policy/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apipolicyv1beta1.PodDisruptionBudget{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapPolicyV1beta1PodDisruptionBudgetImpl) ApplyStatus(ctx context.Context, in *policyv1beta1.PodDisruptionBudgetApplyConfiguration, opts metav1.ApplyOptions) (result *apipolicyv1beta1.PodDisruptionBudget, err error) { - panic("NYI") + in.Kind = ptr.String("PodDisruptionBudget") + + in.APIVersion = ptr.String("policy/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apipolicyv1beta1.PodDisruptionBudget{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapPolicyV1beta1PodDisruptionBudgetImpl) Create(ctx context.Context, in *apipolicyv1beta1.PodDisruptionBudget, opts metav1.CreateOptions) (*apipolicyv1beta1.PodDisruptionBudget, error) { @@ -11214,11 +13519,43 @@ type wrapPolicyV1beta1PodSecurityPolicyImpl struct { var _ typedpolicyv1beta1.PodSecurityPolicyInterface = (*wrapPolicyV1beta1PodSecurityPolicyImpl)(nil) func (w *wrapPolicyV1beta1PodSecurityPolicyImpl) Apply(ctx context.Context, in *policyv1beta1.PodSecurityPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apipolicyv1beta1.PodSecurityPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("PodSecurityPolicy") + + in.APIVersion = ptr.String("policy/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apipolicyv1beta1.PodSecurityPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapPolicyV1beta1PodSecurityPolicyImpl) ApplyStatus(ctx context.Context, in *policyv1beta1.PodSecurityPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *apipolicyv1beta1.PodSecurityPolicy, err error) { - panic("NYI") + in.Kind = ptr.String("PodSecurityPolicy") + + in.APIVersion = ptr.String("policy/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apipolicyv1beta1.PodSecurityPolicy{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapPolicyV1beta1PodSecurityPolicyImpl) Create(ctx context.Context, in *apipolicyv1beta1.PodSecurityPolicy, opts metav1.CreateOptions) (*apipolicyv1beta1.PodSecurityPolicy, error) { @@ -11364,11 +13701,43 @@ type wrapRbacV1ClusterRoleImpl struct { var _ typedrbacv1.ClusterRoleInterface = (*wrapRbacV1ClusterRoleImpl)(nil) func (w *wrapRbacV1ClusterRoleImpl) Apply(ctx context.Context, in *rbacv1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.ClusterRole, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRole") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.ClusterRole{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1ClusterRoleImpl) ApplyStatus(ctx context.Context, in *rbacv1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.ClusterRole, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRole") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.ClusterRole{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1ClusterRoleImpl) Create(ctx context.Context, in *apirbacv1.ClusterRole, opts metav1.CreateOptions) (*apirbacv1.ClusterRole, error) { @@ -11499,11 +13868,43 @@ type wrapRbacV1ClusterRoleBindingImpl struct { var _ typedrbacv1.ClusterRoleBindingInterface = (*wrapRbacV1ClusterRoleBindingImpl)(nil) func (w *wrapRbacV1ClusterRoleBindingImpl) Apply(ctx context.Context, in *rbacv1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.ClusterRoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.ClusterRoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1ClusterRoleBindingImpl) ApplyStatus(ctx context.Context, in *rbacv1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.ClusterRoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.ClusterRoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1ClusterRoleBindingImpl) Create(ctx context.Context, in *apirbacv1.ClusterRoleBinding, opts metav1.CreateOptions) (*apirbacv1.ClusterRoleBinding, error) { @@ -11638,11 +14039,43 @@ type wrapRbacV1RoleImpl struct { var _ typedrbacv1.RoleInterface = (*wrapRbacV1RoleImpl)(nil) func (w *wrapRbacV1RoleImpl) Apply(ctx context.Context, in *rbacv1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.Role, err error) { - panic("NYI") + in.Kind = ptr.String("Role") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.Role{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1RoleImpl) ApplyStatus(ctx context.Context, in *rbacv1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.Role, err error) { - panic("NYI") + in.Kind = ptr.String("Role") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.Role{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1RoleImpl) Create(ctx context.Context, in *apirbacv1.Role, opts metav1.CreateOptions) (*apirbacv1.Role, error) { @@ -11777,11 +14210,43 @@ type wrapRbacV1RoleBindingImpl struct { var _ typedrbacv1.RoleBindingInterface = (*wrapRbacV1RoleBindingImpl)(nil) func (w *wrapRbacV1RoleBindingImpl) Apply(ctx context.Context, in *rbacv1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.RoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("RoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.RoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1RoleBindingImpl) ApplyStatus(ctx context.Context, in *rbacv1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1.RoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("RoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1.RoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1RoleBindingImpl) Create(ctx context.Context, in *apirbacv1.RoleBinding, opts metav1.CreateOptions) (*apirbacv1.RoleBinding, error) { @@ -11927,11 +14392,43 @@ type wrapRbacV1alpha1ClusterRoleImpl struct { var _ typedrbacv1alpha1.ClusterRoleInterface = (*wrapRbacV1alpha1ClusterRoleImpl)(nil) func (w *wrapRbacV1alpha1ClusterRoleImpl) Apply(ctx context.Context, in *rbacv1alpha1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.ClusterRole, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRole") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.ClusterRole{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1ClusterRoleImpl) ApplyStatus(ctx context.Context, in *rbacv1alpha1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.ClusterRole, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRole") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.ClusterRole{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1ClusterRoleImpl) Create(ctx context.Context, in *apirbacv1alpha1.ClusterRole, opts metav1.CreateOptions) (*apirbacv1alpha1.ClusterRole, error) { @@ -12062,11 +14559,43 @@ type wrapRbacV1alpha1ClusterRoleBindingImpl struct { var _ typedrbacv1alpha1.ClusterRoleBindingInterface = (*wrapRbacV1alpha1ClusterRoleBindingImpl)(nil) func (w *wrapRbacV1alpha1ClusterRoleBindingImpl) Apply(ctx context.Context, in *rbacv1alpha1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.ClusterRoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.ClusterRoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1ClusterRoleBindingImpl) ApplyStatus(ctx context.Context, in *rbacv1alpha1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.ClusterRoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.ClusterRoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1ClusterRoleBindingImpl) Create(ctx context.Context, in *apirbacv1alpha1.ClusterRoleBinding, opts metav1.CreateOptions) (*apirbacv1alpha1.ClusterRoleBinding, error) { @@ -12201,11 +14730,43 @@ type wrapRbacV1alpha1RoleImpl struct { var _ typedrbacv1alpha1.RoleInterface = (*wrapRbacV1alpha1RoleImpl)(nil) func (w *wrapRbacV1alpha1RoleImpl) Apply(ctx context.Context, in *rbacv1alpha1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.Role, err error) { - panic("NYI") + in.Kind = ptr.String("Role") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.Role{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1RoleImpl) ApplyStatus(ctx context.Context, in *rbacv1alpha1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.Role, err error) { - panic("NYI") + in.Kind = ptr.String("Role") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.Role{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1RoleImpl) Create(ctx context.Context, in *apirbacv1alpha1.Role, opts metav1.CreateOptions) (*apirbacv1alpha1.Role, error) { @@ -12340,11 +14901,43 @@ type wrapRbacV1alpha1RoleBindingImpl struct { var _ typedrbacv1alpha1.RoleBindingInterface = (*wrapRbacV1alpha1RoleBindingImpl)(nil) func (w *wrapRbacV1alpha1RoleBindingImpl) Apply(ctx context.Context, in *rbacv1alpha1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.RoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("RoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.RoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1RoleBindingImpl) ApplyStatus(ctx context.Context, in *rbacv1alpha1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1alpha1.RoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("RoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1alpha1.RoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1alpha1RoleBindingImpl) Create(ctx context.Context, in *apirbacv1alpha1.RoleBinding, opts metav1.CreateOptions) (*apirbacv1alpha1.RoleBinding, error) { @@ -12490,11 +15083,43 @@ type wrapRbacV1beta1ClusterRoleImpl struct { var _ typedrbacv1beta1.ClusterRoleInterface = (*wrapRbacV1beta1ClusterRoleImpl)(nil) func (w *wrapRbacV1beta1ClusterRoleImpl) Apply(ctx context.Context, in *rbacv1beta1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.ClusterRole, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRole") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.ClusterRole{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1ClusterRoleImpl) ApplyStatus(ctx context.Context, in *rbacv1beta1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.ClusterRole, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRole") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.ClusterRole{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1ClusterRoleImpl) Create(ctx context.Context, in *apirbacv1beta1.ClusterRole, opts metav1.CreateOptions) (*apirbacv1beta1.ClusterRole, error) { @@ -12625,11 +15250,43 @@ type wrapRbacV1beta1ClusterRoleBindingImpl struct { var _ typedrbacv1beta1.ClusterRoleBindingInterface = (*wrapRbacV1beta1ClusterRoleBindingImpl)(nil) func (w *wrapRbacV1beta1ClusterRoleBindingImpl) Apply(ctx context.Context, in *rbacv1beta1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.ClusterRoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.ClusterRoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1ClusterRoleBindingImpl) ApplyStatus(ctx context.Context, in *rbacv1beta1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.ClusterRoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("ClusterRoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.ClusterRoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1ClusterRoleBindingImpl) Create(ctx context.Context, in *apirbacv1beta1.ClusterRoleBinding, opts metav1.CreateOptions) (*apirbacv1beta1.ClusterRoleBinding, error) { @@ -12764,11 +15421,43 @@ type wrapRbacV1beta1RoleImpl struct { var _ typedrbacv1beta1.RoleInterface = (*wrapRbacV1beta1RoleImpl)(nil) func (w *wrapRbacV1beta1RoleImpl) Apply(ctx context.Context, in *rbacv1beta1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.Role, err error) { - panic("NYI") + in.Kind = ptr.String("Role") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.Role{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1RoleImpl) ApplyStatus(ctx context.Context, in *rbacv1beta1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.Role, err error) { - panic("NYI") + in.Kind = ptr.String("Role") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.Role{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1RoleImpl) Create(ctx context.Context, in *apirbacv1beta1.Role, opts metav1.CreateOptions) (*apirbacv1beta1.Role, error) { @@ -12903,11 +15592,43 @@ type wrapRbacV1beta1RoleBindingImpl struct { var _ typedrbacv1beta1.RoleBindingInterface = (*wrapRbacV1beta1RoleBindingImpl)(nil) func (w *wrapRbacV1beta1RoleBindingImpl) Apply(ctx context.Context, in *rbacv1beta1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.RoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("RoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.RoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1RoleBindingImpl) ApplyStatus(ctx context.Context, in *rbacv1beta1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *apirbacv1beta1.RoleBinding, err error) { - panic("NYI") + in.Kind = ptr.String("RoleBinding") + + in.APIVersion = ptr.String("rbac.authorization.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apirbacv1beta1.RoleBinding{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapRbacV1beta1RoleBindingImpl) Create(ctx context.Context, in *apirbacv1beta1.RoleBinding, opts metav1.CreateOptions) (*apirbacv1beta1.RoleBinding, error) { @@ -13053,11 +15774,43 @@ type wrapSchedulingV1PriorityClassImpl struct { var _ typedschedulingv1.PriorityClassInterface = (*wrapSchedulingV1PriorityClassImpl)(nil) func (w *wrapSchedulingV1PriorityClassImpl) Apply(ctx context.Context, in *schedulingv1.PriorityClassApplyConfiguration, opts metav1.ApplyOptions) (result *apischedulingv1.PriorityClass, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityClass") + + in.APIVersion = ptr.String("scheduling.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apischedulingv1.PriorityClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapSchedulingV1PriorityClassImpl) ApplyStatus(ctx context.Context, in *schedulingv1.PriorityClassApplyConfiguration, opts metav1.ApplyOptions) (result *apischedulingv1.PriorityClass, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityClass") + + in.APIVersion = ptr.String("scheduling.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apischedulingv1.PriorityClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapSchedulingV1PriorityClassImpl) Create(ctx context.Context, in *apischedulingv1.PriorityClass, opts metav1.CreateOptions) (*apischedulingv1.PriorityClass, error) { @@ -13203,11 +15956,43 @@ type wrapSchedulingV1alpha1PriorityClassImpl struct { var _ typedschedulingv1alpha1.PriorityClassInterface = (*wrapSchedulingV1alpha1PriorityClassImpl)(nil) func (w *wrapSchedulingV1alpha1PriorityClassImpl) Apply(ctx context.Context, in *schedulingv1alpha1.PriorityClassApplyConfiguration, opts metav1.ApplyOptions) (result *apischedulingv1alpha1.PriorityClass, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityClass") + + in.APIVersion = ptr.String("scheduling.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apischedulingv1alpha1.PriorityClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapSchedulingV1alpha1PriorityClassImpl) ApplyStatus(ctx context.Context, in *schedulingv1alpha1.PriorityClassApplyConfiguration, opts metav1.ApplyOptions) (result *apischedulingv1alpha1.PriorityClass, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityClass") + + in.APIVersion = ptr.String("scheduling.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apischedulingv1alpha1.PriorityClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapSchedulingV1alpha1PriorityClassImpl) Create(ctx context.Context, in *apischedulingv1alpha1.PriorityClass, opts metav1.CreateOptions) (*apischedulingv1alpha1.PriorityClass, error) { @@ -13353,11 +16138,43 @@ type wrapSchedulingV1beta1PriorityClassImpl struct { var _ typedschedulingv1beta1.PriorityClassInterface = (*wrapSchedulingV1beta1PriorityClassImpl)(nil) func (w *wrapSchedulingV1beta1PriorityClassImpl) Apply(ctx context.Context, in *schedulingv1beta1.PriorityClassApplyConfiguration, opts metav1.ApplyOptions) (result *apischedulingv1beta1.PriorityClass, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityClass") + + in.APIVersion = ptr.String("scheduling.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apischedulingv1beta1.PriorityClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapSchedulingV1beta1PriorityClassImpl) ApplyStatus(ctx context.Context, in *schedulingv1beta1.PriorityClassApplyConfiguration, opts metav1.ApplyOptions) (result *apischedulingv1beta1.PriorityClass, err error) { - panic("NYI") + in.Kind = ptr.String("PriorityClass") + + in.APIVersion = ptr.String("scheduling.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apischedulingv1beta1.PriorityClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapSchedulingV1beta1PriorityClassImpl) Create(ctx context.Context, in *apischedulingv1beta1.PriorityClass, opts metav1.CreateOptions) (*apischedulingv1beta1.PriorityClass, error) { @@ -13503,11 +16320,43 @@ type wrapStorageV1CSIDriverImpl struct { var _ typedstoragev1.CSIDriverInterface = (*wrapStorageV1CSIDriverImpl)(nil) func (w *wrapStorageV1CSIDriverImpl) Apply(ctx context.Context, in *storagev1.CSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.CSIDriver, err error) { - panic("NYI") + in.Kind = ptr.String("CSIDriver") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.CSIDriver{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1CSIDriverImpl) ApplyStatus(ctx context.Context, in *storagev1.CSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.CSIDriver, err error) { - panic("NYI") + in.Kind = ptr.String("CSIDriver") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.CSIDriver{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1CSIDriverImpl) Create(ctx context.Context, in *apistoragev1.CSIDriver, opts metav1.CreateOptions) (*apistoragev1.CSIDriver, error) { @@ -13638,11 +16487,43 @@ type wrapStorageV1CSINodeImpl struct { var _ typedstoragev1.CSINodeInterface = (*wrapStorageV1CSINodeImpl)(nil) func (w *wrapStorageV1CSINodeImpl) Apply(ctx context.Context, in *storagev1.CSINodeApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.CSINode, err error) { - panic("NYI") + in.Kind = ptr.String("CSINode") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.CSINode{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1CSINodeImpl) ApplyStatus(ctx context.Context, in *storagev1.CSINodeApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.CSINode, err error) { - panic("NYI") + in.Kind = ptr.String("CSINode") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.CSINode{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1CSINodeImpl) Create(ctx context.Context, in *apistoragev1.CSINode, opts metav1.CreateOptions) (*apistoragev1.CSINode, error) { @@ -13777,11 +16658,43 @@ type wrapStorageV1CSIStorageCapacityImpl struct { var _ typedstoragev1.CSIStorageCapacityInterface = (*wrapStorageV1CSIStorageCapacityImpl)(nil) func (w *wrapStorageV1CSIStorageCapacityImpl) Apply(ctx context.Context, in *storagev1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.CSIStorageCapacity, err error) { - panic("NYI") + in.Kind = ptr.String("CSIStorageCapacity") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.CSIStorageCapacity{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1CSIStorageCapacityImpl) ApplyStatus(ctx context.Context, in *storagev1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.CSIStorageCapacity, err error) { - panic("NYI") + in.Kind = ptr.String("CSIStorageCapacity") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.CSIStorageCapacity{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1CSIStorageCapacityImpl) Create(ctx context.Context, in *apistoragev1.CSIStorageCapacity, opts metav1.CreateOptions) (*apistoragev1.CSIStorageCapacity, error) { @@ -13912,11 +16825,43 @@ type wrapStorageV1StorageClassImpl struct { var _ typedstoragev1.StorageClassInterface = (*wrapStorageV1StorageClassImpl)(nil) func (w *wrapStorageV1StorageClassImpl) Apply(ctx context.Context, in *storagev1.StorageClassApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.StorageClass, err error) { - panic("NYI") + in.Kind = ptr.String("StorageClass") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.StorageClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1StorageClassImpl) ApplyStatus(ctx context.Context, in *storagev1.StorageClassApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.StorageClass, err error) { - panic("NYI") + in.Kind = ptr.String("StorageClass") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.StorageClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1StorageClassImpl) Create(ctx context.Context, in *apistoragev1.StorageClass, opts metav1.CreateOptions) (*apistoragev1.StorageClass, error) { @@ -14047,11 +16992,43 @@ type wrapStorageV1VolumeAttachmentImpl struct { var _ typedstoragev1.VolumeAttachmentInterface = (*wrapStorageV1VolumeAttachmentImpl)(nil) func (w *wrapStorageV1VolumeAttachmentImpl) Apply(ctx context.Context, in *storagev1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.VolumeAttachment, err error) { - panic("NYI") + in.Kind = ptr.String("VolumeAttachment") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.VolumeAttachment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1VolumeAttachmentImpl) ApplyStatus(ctx context.Context, in *storagev1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1.VolumeAttachment, err error) { - panic("NYI") + in.Kind = ptr.String("VolumeAttachment") + + in.APIVersion = ptr.String("storage.k8s.io/v1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1.VolumeAttachment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1VolumeAttachmentImpl) Create(ctx context.Context, in *apistoragev1.VolumeAttachment, opts metav1.CreateOptions) (*apistoragev1.VolumeAttachment, error) { @@ -14201,11 +17178,43 @@ type wrapStorageV1alpha1CSIStorageCapacityImpl struct { var _ typedstoragev1alpha1.CSIStorageCapacityInterface = (*wrapStorageV1alpha1CSIStorageCapacityImpl)(nil) func (w *wrapStorageV1alpha1CSIStorageCapacityImpl) Apply(ctx context.Context, in *storagev1alpha1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1alpha1.CSIStorageCapacity, err error) { - panic("NYI") + in.Kind = ptr.String("CSIStorageCapacity") + + in.APIVersion = ptr.String("storage.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1alpha1.CSIStorageCapacity{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1alpha1CSIStorageCapacityImpl) ApplyStatus(ctx context.Context, in *storagev1alpha1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1alpha1.CSIStorageCapacity, err error) { - panic("NYI") + in.Kind = ptr.String("CSIStorageCapacity") + + in.APIVersion = ptr.String("storage.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1alpha1.CSIStorageCapacity{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1alpha1CSIStorageCapacityImpl) Create(ctx context.Context, in *apistoragev1alpha1.CSIStorageCapacity, opts metav1.CreateOptions) (*apistoragev1alpha1.CSIStorageCapacity, error) { @@ -14336,11 +17345,43 @@ type wrapStorageV1alpha1VolumeAttachmentImpl struct { var _ typedstoragev1alpha1.VolumeAttachmentInterface = (*wrapStorageV1alpha1VolumeAttachmentImpl)(nil) func (w *wrapStorageV1alpha1VolumeAttachmentImpl) Apply(ctx context.Context, in *storagev1alpha1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1alpha1.VolumeAttachment, err error) { - panic("NYI") + in.Kind = ptr.String("VolumeAttachment") + + in.APIVersion = ptr.String("storage.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1alpha1.VolumeAttachment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1alpha1VolumeAttachmentImpl) ApplyStatus(ctx context.Context, in *storagev1alpha1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1alpha1.VolumeAttachment, err error) { - panic("NYI") + in.Kind = ptr.String("VolumeAttachment") + + in.APIVersion = ptr.String("storage.k8s.io/v1alpha1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1alpha1.VolumeAttachment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1alpha1VolumeAttachmentImpl) Create(ctx context.Context, in *apistoragev1alpha1.VolumeAttachment, opts metav1.CreateOptions) (*apistoragev1alpha1.VolumeAttachment, error) { @@ -14486,11 +17527,43 @@ type wrapStorageV1beta1CSIDriverImpl struct { var _ typedstoragev1beta1.CSIDriverInterface = (*wrapStorageV1beta1CSIDriverImpl)(nil) func (w *wrapStorageV1beta1CSIDriverImpl) Apply(ctx context.Context, in *storagev1beta1.CSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.CSIDriver, err error) { - panic("NYI") + in.Kind = ptr.String("CSIDriver") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.CSIDriver{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1CSIDriverImpl) ApplyStatus(ctx context.Context, in *storagev1beta1.CSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.CSIDriver, err error) { - panic("NYI") + in.Kind = ptr.String("CSIDriver") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.CSIDriver{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1CSIDriverImpl) Create(ctx context.Context, in *apistoragev1beta1.CSIDriver, opts metav1.CreateOptions) (*apistoragev1beta1.CSIDriver, error) { @@ -14621,11 +17694,43 @@ type wrapStorageV1beta1CSINodeImpl struct { var _ typedstoragev1beta1.CSINodeInterface = (*wrapStorageV1beta1CSINodeImpl)(nil) func (w *wrapStorageV1beta1CSINodeImpl) Apply(ctx context.Context, in *storagev1beta1.CSINodeApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.CSINode, err error) { - panic("NYI") + in.Kind = ptr.String("CSINode") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.CSINode{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1CSINodeImpl) ApplyStatus(ctx context.Context, in *storagev1beta1.CSINodeApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.CSINode, err error) { - panic("NYI") + in.Kind = ptr.String("CSINode") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.CSINode{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1CSINodeImpl) Create(ctx context.Context, in *apistoragev1beta1.CSINode, opts metav1.CreateOptions) (*apistoragev1beta1.CSINode, error) { @@ -14760,11 +17865,43 @@ type wrapStorageV1beta1CSIStorageCapacityImpl struct { var _ typedstoragev1beta1.CSIStorageCapacityInterface = (*wrapStorageV1beta1CSIStorageCapacityImpl)(nil) func (w *wrapStorageV1beta1CSIStorageCapacityImpl) Apply(ctx context.Context, in *storagev1beta1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.CSIStorageCapacity, err error) { - panic("NYI") + in.Kind = ptr.String("CSIStorageCapacity") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.CSIStorageCapacity{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1CSIStorageCapacityImpl) ApplyStatus(ctx context.Context, in *storagev1beta1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.CSIStorageCapacity, err error) { - panic("NYI") + in.Kind = ptr.String("CSIStorageCapacity") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Namespace(w.namespace).ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.CSIStorageCapacity{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1CSIStorageCapacityImpl) Create(ctx context.Context, in *apistoragev1beta1.CSIStorageCapacity, opts metav1.CreateOptions) (*apistoragev1beta1.CSIStorageCapacity, error) { @@ -14895,11 +18032,43 @@ type wrapStorageV1beta1StorageClassImpl struct { var _ typedstoragev1beta1.StorageClassInterface = (*wrapStorageV1beta1StorageClassImpl)(nil) func (w *wrapStorageV1beta1StorageClassImpl) Apply(ctx context.Context, in *storagev1beta1.StorageClassApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.StorageClass, err error) { - panic("NYI") + in.Kind = ptr.String("StorageClass") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.StorageClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1StorageClassImpl) ApplyStatus(ctx context.Context, in *storagev1beta1.StorageClassApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.StorageClass, err error) { - panic("NYI") + in.Kind = ptr.String("StorageClass") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.StorageClass{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1StorageClassImpl) Create(ctx context.Context, in *apistoragev1beta1.StorageClass, opts metav1.CreateOptions) (*apistoragev1beta1.StorageClass, error) { @@ -15030,11 +18199,43 @@ type wrapStorageV1beta1VolumeAttachmentImpl struct { var _ typedstoragev1beta1.VolumeAttachmentInterface = (*wrapStorageV1beta1VolumeAttachmentImpl)(nil) func (w *wrapStorageV1beta1VolumeAttachmentImpl) Apply(ctx context.Context, in *storagev1beta1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.VolumeAttachment, err error) { - panic("NYI") + in.Kind = ptr.String("VolumeAttachment") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.VolumeAttachment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1VolumeAttachmentImpl) ApplyStatus(ctx context.Context, in *storagev1beta1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *apistoragev1beta1.VolumeAttachment, err error) { - panic("NYI") + in.Kind = ptr.String("VolumeAttachment") + + in.APIVersion = ptr.String("storage.k8s.io/v1beta1") + + uo := &unstructured.Unstructured{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &apistoragev1beta1.VolumeAttachment{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } func (w *wrapStorageV1beta1VolumeAttachmentImpl) Create(ctx context.Context, in *apistoragev1beta1.VolumeAttachment, opts metav1.CreateOptions) (*apistoragev1beta1.VolumeAttachment, error) { diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go index 72047707769..b5059684666 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go @@ -29,6 +29,7 @@ type CustomArgs struct { ExternalVersionsInformersPackage string ListersPackage string ForceKinds string + ListerHasPointerElem bool } // NewDefaults returns default arguments for the generator. @@ -45,6 +46,7 @@ func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&ca.ExternalVersionsInformersPackage, "external-versions-informers-package", ca.ExternalVersionsInformersPackage, "the full package name for the external versions injection informer to use") fs.StringVar(&ca.ListersPackage, "listers-package", ca.ListersPackage, "the full package name for client listers to use") fs.StringVar(&ca.ForceKinds, "force-genreconciler-kinds", ca.ForceKinds, `force kinds will override the genreconciler tag setting for the given set of kinds, comma separated: "Foo,Bar,Baz"`) + fs.BoolVar(&ca.ListerHasPointerElem, "lister-has-pointer-elem", ca.ListerHasPointerElem, "set to true if the List types have an Item array of pointer element types") } // Validate checks the given arguments. diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go index 6248db52fe7..8338ed647c1 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go @@ -286,6 +286,11 @@ func (g *clientGenerator) GenerateType(c *generator.Context, t *types.Type, w io "Group": group, "VersionLower": version, "Kind": t.Name.Name, + + "ptrString": c.Universe.Function(types.Name{ + Package: "knative.dev/pkg/ptr", + Name: "String", + }), } for _, v := range verbs.List() { @@ -575,13 +580,51 @@ func (w *wrap{{.GroupGoName}}{{.Version}}{{ .Type.Name.Name }}Impl) Patch(ctx {{ `, "apply": `{{if .generateApply}} func (w *wrap{{.GroupGoName}}{{.Version}}{{ .Type.Name.Name }}Impl) Apply(ctx {{ .contextContext|raw }}, in *{{ .ApplyType|raw }}, opts {{ .metav1ApplyOptions|raw }}) (result *{{ .ResultType|raw }}, err error) { - panic("NYI") + in.Kind = {{ .ptrString|raw }}("{{ .Kind }}") + {{ if .Group }} + in.APIVersion = {{ .ptrString|raw }}("{{ .Group }}/{{ .VersionLower }}") + {{ else }} + in.APIVersion = {{ .ptrString|raw }}("{{ .VersionLower }}") + {{ end }} + + uo := &{{ .unstructuredUnstructured|raw }}{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn{{if .Namespaced}}.Namespace(w.namespace){{end}}.Apply(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &{{ .ResultType|raw }}{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } {{end}} `, "applyStatus": `{{if .generateApply}} func (w *wrap{{.GroupGoName}}{{.Version}}{{ .Type.Name.Name }}Impl) ApplyStatus(ctx {{ .contextContext|raw }}, in *{{ .ApplyType|raw }}, opts {{ .metav1ApplyOptions|raw }}) (result *{{ .ResultType|raw }}, err error) { - panic("NYI") + in.Kind = {{ .ptrString|raw }}("{{ .Kind }}") + {{ if .Group }} + in.APIVersion = {{ .ptrString|raw }}("{{ .Group }}/{{ .VersionLower }}") + {{ else }} + in.APIVersion = {{ .ptrString|raw }}("{{ .VersionLower }}") + {{ end }} + + uo := &{{ .unstructuredUnstructured|raw }}{} + if err := convert(in, uo); err != nil { + return nil, err + } + uo, err = w.dyn{{if .Namespaced}}.Namespace(w.namespace){{end}}.ApplyStatus(ctx, uo.GetName(), uo, opts) + if err != nil { + return nil, err + } + out := &{{ .ResultType|raw }}{} + if err := convert(uo, out); err != nil { + return nil, err + } + return out, nil } {{end}} `, diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/filtered_informer.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/filtered_informer.go index 53debfb38e5..b9c5c4ae2f8 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/filtered_informer.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/filtered_informer.go @@ -41,6 +41,7 @@ type filteredInjectionGenerator struct { injectionClientSetPackage string clientSetPackage string listerPkg string + listerHasPointerElem bool } var _ generator.Generator = (*filteredInjectionGenerator)(nil) @@ -92,6 +93,7 @@ func (g *filteredInjectionGenerator) GenerateType(c *generator.Context, t *types "clientSetInterface": c.Universe.Type(types.Name{Package: g.clientSetPackage, Name: "Interface"}), "resourceLister": c.Universe.Type(types.Name{Name: g.typeToGenerate.Name.Name + "Lister", Package: g.listerPkg}), "resourceNamespaceLister": c.Universe.Type(types.Name{Name: g.typeToGenerate.Name.Name + "NamespaceLister", Package: g.listerPkg}), + "listerHasPointerElem": g.listerHasPointerElem, "groupGoName": namer.IC(g.groupGoName), "versionGoName": namer.IC(g.groupVersion.Version.String()), "group": namer.IC(g.groupGoName), @@ -246,7 +248,7 @@ func (w *wrapper) List(selector {{ .labelsSelector|raw }}) (ret []*{{ .type|raw return nil, err } for idx := range lo.Items { - ret = append(ret, &lo.Items[idx]) + ret = append(ret, {{if not .listerHasPointerElem}}&{{end}}lo.Items[idx]) } return ret, nil } diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go index d00158b28e5..305ec2476e4 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go @@ -41,6 +41,7 @@ type injectionGenerator struct { injectionClientSetPackage string clientSetPackage string listerPkg string + listerHasPointerElem bool } var _ generator.Generator = (*injectionGenerator)(nil) @@ -92,6 +93,7 @@ func (g *injectionGenerator) GenerateType(c *generator.Context, t *types.Type, w "clientSetInterface": c.Universe.Type(types.Name{Package: g.clientSetPackage, Name: "Interface"}), "resourceLister": c.Universe.Type(types.Name{Name: g.typeToGenerate.Name.Name + "Lister", Package: g.listerPkg}), "resourceNamespaceLister": c.Universe.Type(types.Name{Name: g.typeToGenerate.Name.Name + "NamespaceLister", Package: g.listerPkg}), + "listerHasPointerElem": g.listerHasPointerElem, "groupGoName": namer.IC(g.groupGoName), "versionGoName": namer.IC(g.groupVersion.Version.String()), "group": g.groupVersion.Group.String(), @@ -226,7 +228,7 @@ func (w *wrapper) List(selector {{ .labelsSelector|raw }}) (ret []*{{ .type|raw return nil, err } for idx := range lo.Items { - ret = append(ret, &lo.Items[idx]) + ret = append(ret, {{if not .listerHasPointerElem}}&{{end}}lo.Items[idx]) } return ret, nil } diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go index 62a143d43ed..8c3fe5240e3 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go @@ -446,6 +446,7 @@ func versionInformerPackages(basePackage string, groupPkgName string, gv clientg clientSetPackage: customArgs.VersionedClientSetPackage, injectionClientSetPackage: filepath.Join(basePackage, "client"), listerPkg: listerPackagePath, + listerHasPointerElem: customArgs.ListerHasPointerElem, }) return generators }, @@ -502,6 +503,7 @@ func versionInformerPackages(basePackage string, groupPkgName string, gv clientg clientSetPackage: customArgs.VersionedClientSetPackage, injectionClientSetPackage: filepath.Join(basePackage, "client"), listerPkg: listerPackagePath, + listerHasPointerElem: customArgs.ListerHasPointerElem, }) return generators }, diff --git a/vendor/knative.dev/pkg/injection/sharedmain/main.go b/vendor/knative.dev/pkg/injection/sharedmain/main.go index 3b8ab3f40bd..8af9eb5d1f7 100644 --- a/vendor/knative.dev/pkg/injection/sharedmain/main.go +++ b/vendor/knative.dev/pkg/injection/sharedmain/main.go @@ -104,6 +104,25 @@ func GetLeaderElectionConfig(ctx context.Context) (*leaderelection.Config, error return leaderelection.NewConfigFromConfigMap(leaderElectionConfigMap) } +// GetObservabilityConfig gets the observability config from the (in order): +// 1. provided context, +// 2. reading from the API server, +// 3. defaults (if not found). +func GetObservabilityConfig(ctx context.Context) (*metrics.ObservabilityConfig, error) { + if cfg := metrics.GetObservabilityConfig(ctx); cfg != nil { + return cfg, nil + } + + observabilityConfigMap, err := kubeclient.Get(ctx).CoreV1().ConfigMaps(system.Namespace()).Get(ctx, metrics.ConfigMapName(), metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + return metrics.NewObservabilityConfigFromConfigMap(nil) + } + if err != nil { + return nil, err + } + return metrics.NewObservabilityConfigFromConfigMap(observabilityConfigMap) +} + // EnableInjectionOrDie enables Knative Injection and starts the informers. // Both Context and Config are optional. // Deprecated: use injection.EnableInjectionOrDie @@ -249,6 +268,8 @@ func MainWithConfig(ctx context.Context, component string, cfg *rest.Config, cto leaderElectionConfig.GetComponentConfig(component)) } + SetupObservabilityOrDie(ctx, component, logger, profilingHandler) + controllers, webhooks := ControllersAndWebhooksFromCtors(ctx, cmw, ctors...) WatchLoggingConfigOrDie(ctx, cmw, logger, atomicLevel, component) WatchObservabilityConfigOrDie(ctx, cmw, profilingHandler, logger, component) @@ -327,6 +348,18 @@ func SetupLoggerOrDie(ctx context.Context, component string) (*zap.SugaredLogger return l, level } +// SetupObservabilityOrDie sets up the observability using the config from the given context +// or dies by calling log.Fatalf. +func SetupObservabilityOrDie(ctx context.Context, component string, logger *zap.SugaredLogger, profilingHandler *profiling.Handler) { + observabilityConfig, err := GetObservabilityConfig(ctx) + if err != nil { + logger.Fatal("Error loading observability configuration: ", err) + } + observabilityConfigMap := observabilityConfig.GetConfigMap() + metrics.ConfigMapWatcher(ctx, component, SecretFetcher(ctx), logger)(&observabilityConfigMap) + profilingHandler.UpdateFromConfigMap(&observabilityConfigMap) +} + // CheckK8sClientMinimumVersionOrDie checks that the hosting Kubernetes cluster // is at least the minimum allowable version or dies by calling log.Fatalw. func CheckK8sClientMinimumVersionOrDie(ctx context.Context, logger *zap.SugaredLogger) { diff --git a/vendor/knative.dev/pkg/kmeta/names.go b/vendor/knative.dev/pkg/kmeta/names.go index eeaa57aef43..963b121d29f 100644 --- a/vendor/knative.dev/pkg/kmeta/names.go +++ b/vendor/knative.dev/pkg/kmeta/names.go @@ -19,7 +19,7 @@ package kmeta import ( "crypto/md5" //nolint:gosec // No strong cryptography needed. "fmt" - "strings" + "regexp" ) // The longest name supported by the K8s is 63. @@ -30,6 +30,8 @@ const ( head = longest - md5Len // How much to truncate to fit the hash. ) +var isAlphanumeric = regexp.MustCompile(`^[a-zA-Z0-9]*$`) + // ChildName generates a name for the resource based upon the parent resource and suffix. // If the concatenated name is longer than K8s permits the name is hashed and truncated to permit // construction of the resource, but still keeps it unique. @@ -55,12 +57,19 @@ func ChildName(parent, suffix string) string { if d := longest - len(ret); d > 0 { ret += suffix[:d] } - // If due to trimming above we're terminating the string with a `-`, - // remove it. - return strings.TrimRight(ret, "-") + return makeValidName(ret) } //nolint:gosec // No strong cryptography needed. n = fmt.Sprintf("%s%x", parent[:head-len(suffix)], md5.Sum([]byte(parent))) } return n + suffix } + +// If due to trimming above we're terminating the string with a non-alphanumeric +// character, remove it. +func makeValidName(n string) string { + for i := len(n) - 1; !isAlphanumeric.MatchString(string(n[i])); i-- { + n = n[:len(n)-1] + } + return n +} diff --git a/vendor/knative.dev/pkg/metrics/config.go b/vendor/knative.dev/pkg/metrics/config.go index 27bbf9206fa..3fe3c1737d1 100644 --- a/vendor/knative.dev/pkg/metrics/config.go +++ b/vendor/knative.dev/pkg/metrics/config.go @@ -124,12 +124,7 @@ func (mc *metricsConfig) record(ctx context.Context, mss []stats.Measurement, ro func createMetricsConfig(_ context.Context, ops ExporterOptions) (*metricsConfig, error) { var mc metricsConfig - - if ops.Domain == "" { - return nil, errors.New("metrics domain cannot be empty") - } mc.domain = ops.Domain - if ops.Component == "" { return nil, errors.New("metrics component name cannot be empty") } @@ -159,6 +154,9 @@ func createMetricsConfig(_ context.Context, ops ExporterOptions) (*metricsConfig switch mc.backendDestination { case openCensus: + if ops.Domain == "" { + return nil, errors.New("metrics domain cannot be empty") + } mc.collectorAddress = ops.ConfigMap[collectorAddressKey] if isSecure := ops.ConfigMap[collectorSecureKey]; isSecure != "" { var err error @@ -221,22 +219,7 @@ func Domain() string { if domain := os.Getenv(DomainEnv); domain != "" { return domain } - - panic(fmt.Sprintf(`The environment variable %q is not set - -If this is a process running on Kubernetes, then it should be specifying -this via: - - env: - - name: %s - value: knative.dev/some-repository - -If this is a Go unit test consuming metric.Domain() then it should add the -following import: - -import ( - _ "knative.dev/pkg/metrics/testing" -)`, DomainEnv, DomainEnv)) + return "" } // prometheusPort returns the TCP port number configured via the environment diff --git a/vendor/knative.dev/pkg/metrics/config_observability.go b/vendor/knative.dev/pkg/metrics/config_observability.go index 0a17e0f03be..b6affd2936d 100644 --- a/vendor/knative.dev/pkg/metrics/config_observability.go +++ b/vendor/knative.dev/pkg/metrics/config_observability.go @@ -17,8 +17,10 @@ limitations under the License. package metrics import ( + "context" "fmt" "os" + "strconv" texttemplate "text/template" corev1 "k8s.io/api/core/v1" @@ -81,6 +83,22 @@ type ObservabilityConfig struct { MetricsCollectorAddress string } +type ocfg struct{} + +// WithConfig associates a observability configuration with the context. +func WithConfig(ctx context.Context, cfg *ObservabilityConfig) context.Context { + return context.WithValue(ctx, ocfg{}, cfg) +} + +// GetObservability gets the observability config from the provided context. +func GetObservabilityConfig(ctx context.Context) *ObservabilityConfig { + untyped := ctx.Value(ocfg{}) + if untyped == nil { + return nil + } + return untyped.(*ObservabilityConfig) +} + func defaultConfig() *ObservabilityConfig { return &ObservabilityConfig{ LoggingURLTemplate: DefaultLogURLTemplate, @@ -92,6 +110,9 @@ func defaultConfig() *ObservabilityConfig { // NewObservabilityConfigFromConfigMap creates a ObservabilityConfig from the supplied ConfigMap func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*ObservabilityConfig, error) { oc := defaultConfig() + if configMap == nil { + return oc, nil + } if err := cm.Parse(configMap.Data, cm.AsBool("logging.enable-var-log-collection", &oc.EnableVarLogCollection), @@ -120,6 +141,21 @@ func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*Observab return oc, nil } +func (oc *ObservabilityConfig) GetConfigMap() corev1.ConfigMap { + return corev1.ConfigMap{ + Data: map[string]string{ + "logging.enable-var-log-collection": strconv.FormatBool(oc.EnableVarLogCollection), + "logging.revision-url-template": oc.LoggingURLTemplate, + ReqLogTemplateKey: oc.RequestLogTemplate, + EnableReqLogKey: strconv.FormatBool(oc.EnableRequestLog), + EnableProbeReqLogKey: strconv.FormatBool(oc.EnableProbeRequestLog), + "metrics.request-metrics-backend-destination": oc.RequestMetricsBackend, + "profiling.enable": strconv.FormatBool(oc.EnableProfiling), + "metrics.opencensus-address": oc.MetricsCollectorAddress, + }, + } +} + // ConfigMapName gets the name of the metrics ConfigMap func ConfigMapName() string { if cm := os.Getenv(configMapNameEnv); cm != "" { diff --git a/vendor/knative.dev/pkg/metrics/prometheus_exporter.go b/vendor/knative.dev/pkg/metrics/prometheus_exporter.go index b6c7787b833..aec6c09a095 100644 --- a/vendor/knative.dev/pkg/metrics/prometheus_exporter.go +++ b/vendor/knative.dev/pkg/metrics/prometheus_exporter.go @@ -82,7 +82,7 @@ func startNewPromSrv(e *prom.Exporter, host string, port int) *http.Server { if curPromSrv != nil { curPromSrv.Close() } - //nolint:gosec // https://github.com/knative/pkg/issues/2632 + //nolint:gosec curPromSrv = &http.Server{ Addr: host + ":" + strconv.Itoa(port), Handler: sm, diff --git a/vendor/knative.dev/pkg/network/h2c.go b/vendor/knative.dev/pkg/network/h2c.go index b8f2d8c2668..4620b084d20 100644 --- a/vendor/knative.dev/pkg/network/h2c.go +++ b/vendor/knative.dev/pkg/network/h2c.go @@ -28,7 +28,7 @@ import ( // NewServer returns a new HTTP Server with HTTP2 handler. func NewServer(addr string, h http.Handler) *http.Server { - //nolint:gosec // https://github.com/knative/pkg/issues/2632 + //nolint:gosec h1s := &http.Server{ Addr: addr, Handler: h2c.NewHandler(h, &http2.Server{}), diff --git a/vendor/knative.dev/pkg/profiling/server.go b/vendor/knative.dev/pkg/profiling/server.go index 526385f05ea..8af5bd98ddc 100644 --- a/vendor/knative.dev/pkg/profiling/server.go +++ b/vendor/knative.dev/pkg/profiling/server.go @@ -110,7 +110,7 @@ func NewServer(handler http.Handler) *http.Server { port = strconv.Itoa(ProfilingPort) } - //nolint:gosec // https://github.com/knative/pkg/issues/2632 + //nolint:gosec return &http.Server{ Addr: ":" + port, Handler: handler, diff --git a/vendor/knative.dev/pkg/reconciler/testing/reactions.go b/vendor/knative.dev/pkg/reconciler/testing/reactions.go index c6d960b9985..bd77d409005 100644 --- a/vendor/knative.dev/pkg/reconciler/testing/reactions.go +++ b/vendor/knative.dev/pkg/reconciler/testing/reactions.go @@ -55,7 +55,8 @@ func ValidateCreates(ctx context.Context, action clientgotesting.Action) (handle if !ok { return false, nil, nil } - if err := obj.Validate(ctx); err != nil { + // Only return error-level errors; warnings should not block API calls. + if err := obj.Validate(ctx).Filter(apis.ErrorLevel); err != nil { return true, nil, err } return false, nil, nil @@ -67,7 +68,8 @@ func ValidateUpdates(ctx context.Context, action clientgotesting.Action) (handle if !ok { return false, nil, nil } - if err := obj.Validate(ctx); err != nil { + // Only return error-level errors; warnings should not block API calls. + if err := obj.Validate(ctx).Filter(apis.ErrorLevel); err != nil { return true, nil, err } return false, nil, nil diff --git a/vendor/knative.dev/pkg/reconciler/testing/table.go b/vendor/knative.dev/pkg/reconciler/testing/table.go index 962ce94baeb..bfeb6825e36 100644 --- a/vendor/knative.dev/pkg/reconciler/testing/table.go +++ b/vendor/knative.dev/pkg/reconciler/testing/table.go @@ -387,10 +387,13 @@ func (tt TableTest) Test(t *testing.T, factory Factory) { t.Run(test.Name, func(t *testing.T) { t.Helper() test.Test(t, factory) + opts := make([]cmp.Option, 0, len(defaultCmpOpts)+len(test.CmpOpts)) + opts = append(opts, defaultCmpOpts...) + opts = append(opts, test.CmpOpts...) // Validate cached objects do not get soiled after controller loops. - if !cmp.Equal(originObjects, test.Objects, defaultCmpOpts...) { + if !cmp.Equal(originObjects, test.Objects, opts...) { t.Errorf("Unexpected objects (-want, +got):\n%s", - cmp.Diff(originObjects, test.Objects, defaultCmpOpts...)) + cmp.Diff(originObjects, test.Objects, opts...)) } }) } diff --git a/vendor/knative.dev/pkg/test/logstream/interface.go b/vendor/knative.dev/pkg/test/logstream/interface.go index 33bc0233229..a1b39aabdab 100644 --- a/vendor/knative.dev/pkg/test/logstream/interface.go +++ b/vendor/knative.dev/pkg/test/logstream/interface.go @@ -18,6 +18,7 @@ package logstream import ( "context" + "fmt" "os" "strings" "sync" @@ -29,9 +30,11 @@ import ( logstreamv2 "knative.dev/pkg/test/logstream/v2" ) -// Canceler is the type of a function returned when a logstream is started to be -// deferred so that the logstream can be stopped when the test is complete. -type Canceler = logstreamv2.Canceler +type ( + // Canceler is the type of function returned when a logstream is started to be + // deferred so that the logstream can be stopped when the test is complete. + Canceler = logstreamv2.Canceler +) type ti interface { Name() string @@ -41,35 +44,39 @@ type ti interface { } // Start begins streaming the logs from system components with a `key:` matching -// `test.ObjectNameForTest(t)` to `t.Log`. It returns a Canceler, which must +// `test.ObjectNameForTest(t)` to `t.Log`. It returns a Canceler, which must // be called before the test completes. func Start(t ti) Canceler { // Do this lazily to make import ordering less important. once.Do(func() { if ns := os.Getenv(system.NamespaceEnvKey); ns != "" { - config, err := test.Flags.GetRESTConfig() - if err != nil { - t.Error("Error loading client config", "error", err) - return - } - - kc, err := kubernetes.NewForConfig(config) - if err != nil { - t.Error("Error creating kubernetes client", "error", err) - return - } - + var err error // handle case when ns contains a csv list namespaces := strings.Split(ns, ",") - stream = &shim{logstreamv2.FromNamespaces(context.Background(), kc, namespaces)} - + if sysStream, err = initStream(namespaces); err != nil { + t.Error("Error initializing logstream", "error", err) + } } else { - // Otherwise set up a null stream. - stream = &null{} + // Otherwise, set up a null stream. + sysStream = &null{} } }) - return stream.Start(t) + return sysStream.Start(t) +} + +func initStream(namespaces []string) (streamer, error) { + config, err := test.Flags.GetRESTConfig() + if err != nil { + return &null{}, fmt.Errorf("error loading client config: %w", err) + } + + kc, err := kubernetes.NewForConfig(config) + if err != nil { + return &null{}, fmt.Errorf("error creating kubernetes client: %w", err) + } + + return &shim{logstreamv2.FromNamespaces(context.Background(), kc, namespaces)}, nil } type streamer interface { @@ -77,8 +84,8 @@ type streamer interface { } var ( - stream streamer - once sync.Once + sysStream streamer + once sync.Once ) type shim struct { diff --git a/vendor/knative.dev/pkg/test/logstream/v2/stream.go b/vendor/knative.dev/pkg/test/logstream/v2/stream.go index b244fe8b7e5..1a37a54d2fa 100644 --- a/vendor/knative.dev/pkg/test/logstream/v2/stream.go +++ b/vendor/knative.dev/pkg/test/logstream/v2/stream.go @@ -20,6 +20,7 @@ import ( "bufio" "context" "encoding/json" + "errors" "fmt" "reflect" "strings" @@ -34,36 +35,70 @@ import ( "knative.dev/pkg/ptr" ) -func FromNamespaces(ctx context.Context, c kubernetes.Interface, namespaces []string) Source { - return &namespaceSource{ - ctx: ctx, - kc: c, - namespaces: namespaces, - keys: make(map[string]Callback, 1), +// New creates a new log source. The source namespaces must be configured through +// log source options. +func New(ctx context.Context, c kubernetes.Interface, opts ...func(*logSource)) Source { + s := &logSource{ + ctx: ctx, + kc: c, + keys: make(map[string]Callback, 1), + filterLines: true, // Filtering log lines by the watched resource name is enabled by default. } + for _, opt := range opts { + opt(s) + } + return s } -func FromNamespace(ctx context.Context, c kubernetes.Interface, namespace string) Source { - return &namespaceSource{ - ctx: ctx, - kc: c, - namespaces: []string{namespace}, - keys: make(map[string]Callback, 1), +// WithNamespaces configures namespaces for log stream. +func WithNamespaces(namespaces ...string) func(*logSource) { + return func(s *logSource) { + s.namespaces = namespaces } } -type namespaceSource struct { +// WithLineFiltering configures whether log lines will be filtered by +// the resource name. +func WithLineFiltering(enabled bool) func(*logSource) { + return func(s *logSource) { + s.filterLines = enabled + } +} + +// WithPodPrefixes specifies which Pods will be included in the +// log stream through the provided prefixes. If no prefixes are +// configured then logs from all Pods in the configured namespaces will +// be streamed. +func WithPodPrefixes(podPrefixes ...string) func(*logSource) { + return func(s *logSource) { + s.podPrefixes = podPrefixes + } +} + +func FromNamespaces(ctx context.Context, c kubernetes.Interface, namespaces []string, opts ...func(*logSource)) Source { + sOpts := []func(*logSource){WithNamespaces(namespaces...)} + sOpts = append(sOpts, opts...) + return New(ctx, c, sOpts...) +} + +func FromNamespace(ctx context.Context, c kubernetes.Interface, namespace string, opts ...func(*logSource)) Source { + return FromNamespaces(ctx, c, []string{namespace}, opts...) +} + +type logSource struct { namespaces []string kc kubernetes.Interface ctx context.Context - m sync.RWMutex - once sync.Once - keys map[string]Callback - watchErr error + m sync.RWMutex + once sync.Once + keys map[string]Callback + filterLines bool + podPrefixes []string + watchErr error } -func (s *namespaceSource) StartStream(name string, l Callback) (Canceler, error) { +func (s *logSource) StartStream(name string, l Callback) (Canceler, error) { s.once.Do(func() { s.watchErr = s.watchPods() }) if s.watchErr != nil { return nil, fmt.Errorf("failed to watch pods in one of the namespace(s) %q: %w", s.namespaces, s.watchErr) @@ -82,7 +117,10 @@ func (s *namespaceSource) StartStream(name string, l Callback) (Canceler, error) }, nil } -func (s *namespaceSource) watchPods() error { +func (s *logSource) watchPods() error { + if len(s.namespaces) == 0 { + return errors.New("namespaces for logstream not configured") + } for _, ns := range s.namespaces { wi, err := s.kc.CoreV1().Pods(ns).Watch(s.ctx, metav1.ListOptions{}) if err != nil { @@ -113,7 +151,7 @@ func (s *namespaceSource) watchPods() error { case watch.Deleted: watchedPods.Delete(p.Name) case watch.Added, watch.Modified: - if !watchedPods.Has(p.Name) && isPodReady(p) { + if !watchedPods.Has(p.Name) && isPodReady(p) && s.matchesPodPrefix(p.Name) { watchedPods.Insert(p.Name) s.startForPod(p) } @@ -127,7 +165,20 @@ func (s *namespaceSource) watchPods() error { return nil } -func (s *namespaceSource) startForPod(pod *corev1.Pod) { +func (s *logSource) matchesPodPrefix(name string) bool { + if len(s.podPrefixes) == 0 { + // Pod prefixes are not configured => always match. + return true + } + for _, p := range s.podPrefixes { + if strings.Contains(name, p) { + return true + } + } + return false +} + +func (s *logSource) startForPod(pod *corev1.Pod) { // Grab data from all containers in the pods. We need this in case // an envoy sidecar is injected for mesh installs. This should be // equivalent to --all-containers. @@ -136,7 +187,7 @@ func (s *namespaceSource) startForPod(pod *corev1.Pod) { psn, pn, cn := pod.Namespace, pod.Name, container.Name handleLine := s.handleLine - if wellKnownContainers.Has(cn) { + if wellKnownContainers.Has(cn) || !s.filterLines { // Specialcase logs from chaosduck, queueproxy etc. // - ChaosDuck logs enable easy // monitoring of killed pods throughout all tests. @@ -196,7 +247,7 @@ const ( // are captured without filtering. var wellKnownContainers = sets.NewString(ChaosDuck, QueueProxy) -func (s *namespaceSource) handleLine(l []byte, pod string, _ string) { +func (s *logSource) handleLine(l []byte, pod string, _ string) { // This holds the standard structure of our logs. var line struct { Level string `json:"severity"` @@ -258,7 +309,7 @@ func (s *namespaceSource) handleLine(l []byte, pod string, _ string) { // handleGenericLine prints the given logline to all active tests as it cannot be parsed // and/or doesn't contain any correlation data (like the chaosduck for example). -func (s *namespaceSource) handleGenericLine(l []byte, pod string, cn string) { +func (s *logSource) handleGenericLine(l []byte, pod string, cn string) { s.m.RLock() defer s.m.RUnlock() diff --git a/vendor/knative.dev/pkg/version/version.go b/vendor/knative.dev/pkg/version/version.go index 32b818ecf42..dbf7daa69aa 100644 --- a/vendor/knative.dev/pkg/version/version.go +++ b/vendor/knative.dev/pkg/version/version.go @@ -33,7 +33,7 @@ const ( // NOTE: If you are changing this line, please also update the minimum kubernetes // version listed here: // https://github.com/knative/docs/blob/mkdocs/docs/snippets/prerequisites.md - defaultMinimumVersion = "v1.23.0" + defaultMinimumVersion = "v1.24.0" ) func getMinimumVersion() string { diff --git a/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/validation_admit.go b/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/validation_admit.go index 2b05a7cd039..002d607915e 100644 --- a/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/validation_admit.go +++ b/vendor/knative.dev/pkg/webhook/resourcesemantics/validation/validation_admit.go @@ -84,7 +84,10 @@ func (ac *reconciler) Admit(ctx context.Context, request *admissionv1.AdmissionR // below all overwrite `resp`, but the `defer` affords us one final // crack at things. defer func() { - resp.Warnings = []string{warnings.Error()} + resp.Warnings = make([]string, 0, len(warnings)) + for _, w := range warnings { + resp.Warnings = append(resp.Warnings, w.Error()) + } }() } if errors != nil { @@ -157,7 +160,7 @@ func (ac *reconciler) decodeRequestAndPrepareContext( return ctx, newObj, nil } -func validate(ctx context.Context, resource resourcesemantics.GenericCRD, req *admissionv1.AdmissionRequest) (err error, warn error) { +func validate(ctx context.Context, resource resourcesemantics.GenericCRD, req *admissionv1.AdmissionRequest) (err error, warn []error) { //nolint logger := logging.FromContext(ctx) // Only run validation for supported create and update validation. @@ -187,7 +190,11 @@ func validate(ctx context.Context, resource resourcesemantics.GenericCRD, req *a err = errorResult } if warningResult := result.Filter(apis.WarningLevel); warningResult != nil { - warn = warningResult + ws := warningResult.WrappedErrors() + warn = make([]error, 0, len(ws)) + for _, w := range ws { + warn = append(warn, w) + } } } return err, warn diff --git a/vendor/knative.dev/pkg/webhook/webhook.go b/vendor/knative.dev/pkg/webhook/webhook.go index ff5533bcefb..435dfe38aa7 100644 --- a/vendor/knative.dev/pkg/webhook/webhook.go +++ b/vendor/knative.dev/pkg/webhook/webhook.go @@ -208,7 +208,7 @@ func (wh *Webhook) Run(stop <-chan struct{}) error { QuietPeriod: wh.Options.GracePeriod, } - //nolint:gosec // https://github.com/knative/pkg/issues/2632 + //nolint:gosec server := &http.Server{ Handler: drainer, Addr: fmt.Sprint(":", wh.Options.Port), diff --git a/vendor/modules.txt b/vendor/modules.txt index 6198018824d..4f79940bf91 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -887,8 +887,6 @@ go.uber.org/atomic go.uber.org/automaxprocs/internal/cgroups go.uber.org/automaxprocs/internal/runtime go.uber.org/automaxprocs/maxprocs -# go.uber.org/goleak v1.2.0 -## explicit; go 1.18 # go.uber.org/multierr v1.8.0 ## explicit; go 1.14 go.uber.org/multierr @@ -1228,7 +1226,7 @@ k8s.io/api/scheduling/v1beta1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.25.2 +# k8s.io/apiextensions-apiserver v0.25.4 ## explicit; go 1.19 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 @@ -1604,7 +1602,7 @@ k8s.io/code-generator/cmd/lister-gen/args k8s.io/code-generator/cmd/lister-gen/generators k8s.io/code-generator/pkg/namer k8s.io/code-generator/pkg/util -# k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7 +# k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9 ## explicit; go 1.13 k8s.io/gengo/args k8s.io/gengo/examples/deepcopy-gen/generators @@ -1617,7 +1615,7 @@ k8s.io/gengo/types # k8s.io/klog v1.0.0 ## explicit; go 1.12 k8s.io/klog -# k8s.io/klog/v2 v2.80.1 +# k8s.io/klog/v2 v2.80.2-0.20221028030830-9ae4992afb54 ## explicit; go 1.13 k8s.io/klog/v2 k8s.io/klog/v2/internal/buffer @@ -1644,7 +1642,7 @@ k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/util/sets k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85 +# k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock @@ -1655,7 +1653,7 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/pkg v0.0.0-20221123011842-b78020c16606 +# knative.dev/pkg v0.0.0-20230117181655-247510c00e9d ## explicit; go 1.18 knative.dev/pkg/apis knative.dev/pkg/apis/duck