Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
make digest field in CLIPlugin API optional
Browse files Browse the repository at this point in the history
Signed-off-by: Harish Yayi <yharish991@gmail.com>
  • Loading branch information
yharish991 committed Nov 12, 2021
1 parent 0e10760 commit 5e6211b
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 94 deletions.
2 changes: 1 addition & 1 deletion apis/cli/v1alpha1/cliplugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Artifact struct {
// AssetURI is a URI of the plugin binary. This can be a fully qualified HTTP path or a local path.
URI string `json:"uri,omitempty"`
// SHA256 hash of the plugin binary.
Digest string `json:"digest"`
Digest string `json:"digest,omitempty"`
// Type of the binary artifact. Valid values are S3, GCP, OCIImage.
Type string `json:"type"`
// OS of the plugin binary in `GOOS` format.
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/cli.tanzu.vmware.com_cliplugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ spec:
type: string
required:
- arch
- digest
- os
- type
type: object
Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/config.tanzu.vmware.com_clientconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ spec:
tags are allowed
type: string
type: object
env:
additionalProperties:
additionalProperties:
type: string
description: EnvMap is simply a hash table, but needs an explicit
type to be an object in another hash map (cf ClientOptions.Env)
type: object
type: object
features:
additionalProperties:
additionalProperties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
kapp.k14s.io/change-group: "cliplugins.cli.tanzu.vmware.com/crd"
creationTimestamp: null
name: cliplugins.cli.tanzu.vmware.com
spec:
Expand All @@ -16,96 +15,89 @@ spec:
singular: cliplugin
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: CLIPlugin denotes a Tanzu cli plugin.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
- name: v1alpha1
schema:
openAPIV3Schema:
description: CLIPlugin denotes a Tanzu cli plugin.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: CLIPluginSpec defines the desired state of CLIPlugin.
properties:
artifacts:
additionalProperties:
description: ArtifactList contains an Artifact object for every
supported platform of a version.
items:
description: Artifact points to an individual plugin binary specific
to a version and platform.
properties:
arch:
description: Arch is CPU architecture of the plugin binary
in `GOARCH` format.
type: string
digest:
description: SHA256 hash of the plugin binary.
type: string
image:
description: Image is a fully qualified OCI image for the
plugin binary.
type: string
os:
description: OS of the plugin binary in `GOOS` format.
type: string
type:
description: Type of the binary artifact. Valid values are
S3, GCP, OCIImage.
type: string
uri:
description: AssetURI is a URI of the plugin binary. This
can be a fully qualified HTTP path or a local path.
type: string
required:
- arch
- digest
- os
- type
type: object
type: array
description: Artifacts contains an artifact list for every supported
version.
type: object
description:
description: Description is the plugin's description.
type: string
optional:
description: Optional specifies whether the plugin is mandatory or
optional If optional, the plugin will not get auto-downloaded as
part of `tanzu login` or `tanzu plugin sync` command To view the
list of plugin, user can use `tanzu plugin list` and to download
a specific plugin run, `tanzu plugin install <plugin-name>`
type: boolean
recommendedVersion:
description: Recommended version that Tanzu CLI should use if available.
The value should be a valid semantic version as defined in https://semver.org/.
E.g., 2.0.1
type: string
required:
- artifacts
- description
- optional
- recommendedVersion
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
type: string
metadata:
type: object
spec:
description: CLIPluginSpec defines the desired state of CLIPlugin.
properties:
artifacts:
additionalProperties:
description: ArtifactList contains an Artifact object for every
supported platform of a version.
items:
description: Artifact points to an individual plugin binary specific
to a version and platform.
properties:
arch:
description: Arch is CPU architecture of the plugin binary
in `GOARCH` format.
type: string
digest:
description: SHA256 hash of the plugin binary.
type: string
image:
description: Image is a fully qualified OCI image for the
plugin binary.
type: string
os:
description: OS of the plugin binary in `GOOS` format.
type: string
type:
description: Type of the binary artifact. Valid values are
S3, GCP, OCIImage.
type: string
uri:
description: AssetURI is a URI of the plugin binary. This
can be a fully qualified HTTP path or a local path.
type: string
required:
- arch
- os
- type
type: object
type: array
description: Artifacts contains an artifact list for every supported
version.
type: object
description:
description: Description is the plugin's description.
type: string
optional:
description: Optional specifies whether the plugin is mandatory or
optional If optional, the plugin will not get auto-downloaded as
part of `tanzu login` or `tanzu plugin sync` command To view the
list of plugin, user can use `tanzu plugin list` and to download
a specific plugin run, `tanzu plugin install <plugin-name>`
type: boolean
recommendedVersion:
description: Recommended version that Tanzu CLI should use if available.
The value should be a valid semantic version as defined in https://semver.org/.
E.g., 2.0.1
type: string
required:
- artifacts
- description
- optional
- recommendedVersion
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
2 changes: 1 addition & 1 deletion packages/management/core-management-plugins/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata
metadata:
name: core-management-plugins.tanzu.vmware.com
namespace: core-management-plugins
namespace: tkg-system
spec:
displayName: "core-management-plugins"
longDescription: "Core Management CLIPlugins package provides the CLIPlugin CRD and default resources needed for the Tanzu CLI to understand the recommended set of plugins to use when talking to the cluster."
Expand Down
2 changes: 1 addition & 1 deletion packages/management/core-management-plugins/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
name: core-management-plugins.tanzu.vmware.com
namespace: core-management-plugins
namespace: tkg-system
spec:
refName: core-management-plugins.tanzu.vmware.com
version: latest
Expand Down

0 comments on commit 5e6211b

Please sign in to comment.