diff --git a/api/porch/types.go b/api/porch/types.go index c903ce10..3f041283 100644 --- a/api/porch/types.go +++ b/api/porch/types.go @@ -448,7 +448,6 @@ type NameMeta struct { Namespace string `json:"namespace,omitempty"` } - // PackageRevisionResources // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/api/porch/v1alpha1/types.go b/api/porch/v1alpha1/types.go index 96903c86..1d5dd3f3 100644 --- a/api/porch/v1alpha1/types.go +++ b/api/porch/v1alpha1/types.go @@ -523,7 +523,6 @@ type PackageRevisionResourcesStatus struct { RenderStatus RenderStatus `json:"renderStatus,omitempty"` } - // Package // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -559,4 +558,4 @@ type PackageStatus struct { // LatestRevision identifies the package revision that is the latest // published package revision belonging to this package LatestRevision string `json:"latestRevision,omitempty"` -} \ No newline at end of file +} diff --git a/api/porch/v1alpha1/util.go b/api/porch/v1alpha1/util.go index de032757..71a0ffa9 100644 --- a/api/porch/v1alpha1/util.go +++ b/api/porch/v1alpha1/util.go @@ -18,7 +18,6 @@ func LifecycleIsPublished(lifecycle PackageRevisionLifecycle) bool { return lifecycle == PackageRevisionLifecyclePublished || lifecycle == PackageRevisionLifecycleDeletionProposed } - // Check ReadinessGates checks if the package has met all readiness gates func PackageRevisionIsReady(readinessGates []ReadinessGate, conditions []Condition) bool { // Index our conditions @@ -38,4 +37,4 @@ func PackageRevisionIsReady(readinessGates []ReadinessGate, conditions []Conditi } return true -} \ No newline at end of file +} diff --git a/api/porchconfig/v1alpha1/types.go b/api/porchconfig/v1alpha1/types.go index 5c7239f1..32457723 100644 --- a/api/porchconfig/v1alpha1/types.go +++ b/api/porchconfig/v1alpha1/types.go @@ -46,7 +46,7 @@ const ( type RepositoryContent string const ( - RepositoryContentPackage RepositoryContent = "Package" + RepositoryContentPackage RepositoryContent = "Package" ) // RepositorySpec defines the desired state of Repository @@ -60,12 +60,12 @@ type RepositorySpec struct { Deployment bool `json:"deployment,omitempty"` // Type of the repository (i.e. git, OCI) Type RepositoryType `json:"type,omitempty"` - // The Content field is deprecated, please do not specify it in new manifests. + // The Content field is deprecated, please do not specify it in new manifests. // For partial backward compatibility it is still recognized, but its only valid value is "Package", and if not specified its default value is also "Package". // +kubebuilder:validation:XValidation:message="The 'content' field is deprecated, its only valid value is 'Package'",rule="self == '' || self == 'Package'" // +kubebuilder:default="Package" Content *RepositoryContent `json:"content,omitempty"` - + // Git repository details. Required if `type` is `git`. Ignored if `type` is not `git`. Git *GitRepository `json:"git,omitempty"` // OCI repository details. Required if `type` is `oci`. Ignored if `type` is not `oci`. diff --git a/pkg/cache/fake/credentialresolver.go b/pkg/cache/fake/credentialresolver.go index 1eff82c4..c9845672 100644 --- a/pkg/cache/fake/credentialresolver.go +++ b/pkg/cache/fake/credentialresolver.go @@ -16,8 +16,8 @@ package fake import ( "context" - "github.com/nephio-project/porch/pkg/repository" "github.com/go-git/go-git/v5/plumbing/transport" + "github.com/nephio-project/porch/pkg/repository" ) type credential struct { @@ -36,7 +36,7 @@ func (c *credential) ToAuthMethod() transport.AuthMethod { panic("unimplemented") } -type CredentialResolver struct{ +type CredentialResolver struct { cabundle string } diff --git a/pkg/cli/commands/rpkg/approve/command_test.go b/pkg/cli/commands/rpkg/approve/command_test.go index 89c5d7f8..3886fdb6 100644 --- a/pkg/cli/commands/rpkg/approve/command_test.go +++ b/pkg/cli/commands/rpkg/approve/command_test.go @@ -101,16 +101,16 @@ func TestCmd(t *testing.T) { Spec: porchapi.PackageRevisionSpec{ Lifecycle: porchapi.PackageRevisionLifecycleProposed, RepositoryName: repoName, - ReadinessGates: []porchapi.ReadinessGate { + ReadinessGates: []porchapi.ReadinessGate{ { ConditionType: "nephio.org.Specializer.specialize", }, }, }, Status: porchapi.PackageRevisionStatus{ - Conditions: []porchapi.Condition { + Conditions: []porchapi.Condition{ { - Type: "nephio.org.Specializer.specialize", + Type: "nephio.org.Specializer.specialize", Status: "False", }, }, diff --git a/pkg/kpt/fn/third_party/GoogleContainerTools/kpt-functions-catalog/functions/go/starlark/generated/docs.go b/pkg/kpt/fn/third_party/GoogleContainerTools/kpt-functions-catalog/functions/go/starlark/generated/docs.go index 2d899c61..ba13be6d 100644 --- a/pkg/kpt/fn/third_party/GoogleContainerTools/kpt-functions-catalog/functions/go/starlark/generated/docs.go +++ b/pkg/kpt/fn/third_party/GoogleContainerTools/kpt-functions-catalog/functions/go/starlark/generated/docs.go @@ -1,5 +1,3 @@ - - // Code generated by "mdtogo"; DO NOT EDIT. package generated diff --git a/pkg/registry/porch/packagerevisions_approval.go b/pkg/registry/porch/packagerevisions_approval.go index 17b7801c..07f1d396 100644 --- a/pkg/registry/porch/packagerevisions_approval.go +++ b/pkg/registry/porch/packagerevisions_approval.go @@ -59,7 +59,7 @@ func (a *packageRevisionsApproval) Get(ctx context.Context, name string, options // Update finds a resource in the storage and updates it. Some implementations // may allow updates creates the object - they should set the created boolean // to true. -func (a *packageRevisionsApproval) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, +func (a *packageRevisionsApproval) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { allowCreate := false // do not allow create on update return a.common.updatePackageRevision(ctx, name, objInfo, createValidation, updateValidation, allowCreate) diff --git a/pkg/registry/porch/secret.go b/pkg/registry/porch/secret.go index 066f708d..17df0360 100644 --- a/pkg/registry/porch/secret.go +++ b/pkg/registry/porch/secret.go @@ -39,10 +39,10 @@ const ( WorkloadIdentityAuthType = "kpt.dev/workload-identity-auth" // Annotation used to specify the gsa for a ksa. - WIGCPSAAnnotation = "iam.gke.io/gcp-service-account" - + WIGCPSAAnnotation = "iam.gke.io/gcp-service-account" + //Secret.Data key required for the caBundle - CaBundleDataName = "ca.crt" + CaBundleDataName = "ca.crt" ) func NewCredentialResolver(coreClient client.Reader, resolverChain []Resolver) repository.CredentialResolver { diff --git a/pkg/registry/porch/secret_test.go b/pkg/registry/porch/secret_test.go index 022c118b..8a3e203b 100644 --- a/pkg/registry/porch/secret_test.go +++ b/pkg/registry/porch/secret_test.go @@ -149,7 +149,7 @@ func TestCaBundleCredentialResolver(t *testing.T) { }, }, expectedCredential: nil, - expectedErrString: "error resolving credential: CaBundle secret.Data key must be set as ca.crt", + expectedErrString: "error resolving credential: CaBundle secret.Data key must be set as ca.crt", }, } @@ -177,7 +177,7 @@ func TestCaBundleCredentialResolver(t *testing.T) { if cred != nil { assert.Equal(t, cred.ToString(), "blah") assert.Equal(t, cred.Valid(), true) - assert.Panics(t, func() {cred.ToAuthMethod()}) + assert.Panics(t, func() { cred.ToAuthMethod() }) } }) }