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

Commit e285706

Browse files
committed
make digest field in CLIPlugin API optional
Signed-off-by: Harish Yayi <yharish991@gmail.com>
1 parent 085393a commit e285706

File tree

6 files changed

+93
-94
lines changed

6 files changed

+93
-94
lines changed

apis/cli/v1alpha1/cliplugin_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Artifact struct {
1717
// AssetURI is a URI of the plugin binary. This can be a fully qualified HTTP path or a local path.
1818
URI string `json:"uri,omitempty"`
1919
// SHA256 hash of the plugin binary.
20-
Digest string `json:"digest"`
20+
Digest string `json:"digest,omitempty"`
2121
// Type of the binary artifact. Valid values are S3, GCP, OCIImage.
2222
Type string `json:"type"`
2323
// OS of the plugin binary in `GOOS` format.

config/crd/bases/cli.tanzu.vmware.com_cliplugins.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ spec:
6868
type: string
6969
required:
7070
- arch
71-
- digest
7271
- os
7372
- type
7473
type: object

config/crd/bases/config.tanzu.vmware.com_clientconfigs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ spec:
166166
tags are allowed
167167
type: string
168168
type: object
169+
env:
170+
additionalProperties:
171+
additionalProperties:
172+
type: string
173+
description: EnvMap is simply a hash table, but needs an explicit
174+
type to be an object in another hash map (cf ClientOptions.Env)
175+
type: object
176+
type: object
169177
features:
170178
additionalProperties:
171179
additionalProperties:

packages/management/core-management-plugins/bundle/config/01_cliplugin-crd.yaml

Lines changed: 82 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.7.0
7-
kapp.k14s.io/change-group: "cliplugins.cli.tanzu.vmware.com/crd"
87
creationTimestamp: null
98
name: cliplugins.cli.tanzu.vmware.com
109
spec:
@@ -16,96 +15,89 @@ spec:
1615
singular: cliplugin
1716
scope: Namespaced
1817
versions:
19-
- name: v1alpha1
20-
schema:
21-
openAPIV3Schema:
22-
description: CLIPlugin denotes a Tanzu cli plugin.
23-
properties:
24-
apiVersion:
25-
description: 'APIVersion defines the versioned schema of this representation
18+
- name: v1alpha1
19+
schema:
20+
openAPIV3Schema:
21+
description: CLIPlugin denotes a Tanzu cli plugin.
22+
properties:
23+
apiVersion:
24+
description: 'APIVersion defines the versioned schema of this representation
2625
of an object. Servers should convert recognized schemas to the latest
2726
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
28-
type: string
29-
kind:
30-
description: 'Kind is a string value representing the REST resource this
27+
type: string
28+
kind:
29+
description: 'Kind is a string value representing the REST resource this
3130
object represents. Servers may infer this from the endpoint the client
3231
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
33-
type: string
34-
metadata:
35-
type: object
36-
spec:
37-
description: CLIPluginSpec defines the desired state of CLIPlugin.
38-
properties:
39-
artifacts:
40-
additionalProperties:
41-
description: ArtifactList contains an Artifact object for every
42-
supported platform of a version.
43-
items:
44-
description: Artifact points to an individual plugin binary specific
45-
to a version and platform.
46-
properties:
47-
arch:
48-
description: Arch is CPU architecture of the plugin binary
49-
in `GOARCH` format.
50-
type: string
51-
digest:
52-
description: SHA256 hash of the plugin binary.
53-
type: string
54-
image:
55-
description: Image is a fully qualified OCI image for the
56-
plugin binary.
57-
type: string
58-
os:
59-
description: OS of the plugin binary in `GOOS` format.
60-
type: string
61-
type:
62-
description: Type of the binary artifact. Valid values are
63-
S3, GCP, OCIImage.
64-
type: string
65-
uri:
66-
description: AssetURI is a URI of the plugin binary. This
67-
can be a fully qualified HTTP path or a local path.
68-
type: string
69-
required:
70-
- arch
71-
- digest
72-
- os
73-
- type
74-
type: object
75-
type: array
76-
description: Artifacts contains an artifact list for every supported
77-
version.
78-
type: object
79-
description:
80-
description: Description is the plugin's description.
81-
type: string
82-
optional:
83-
description: Optional specifies whether the plugin is mandatory or
84-
optional If optional, the plugin will not get auto-downloaded as
85-
part of `tanzu login` or `tanzu plugin sync` command To view the
86-
list of plugin, user can use `tanzu plugin list` and to download
87-
a specific plugin run, `tanzu plugin install <plugin-name>`
88-
type: boolean
89-
recommendedVersion:
90-
description: Recommended version that Tanzu CLI should use if available.
91-
The value should be a valid semantic version as defined in https://semver.org/.
92-
E.g., 2.0.1
93-
type: string
94-
required:
95-
- artifacts
96-
- description
97-
- optional
98-
- recommendedVersion
99-
type: object
100-
required:
101-
- metadata
102-
- spec
103-
type: object
104-
served: true
105-
storage: true
106-
status:
107-
acceptedNames:
108-
kind: ""
109-
plural: ""
110-
conditions: []
111-
storedVersions: []
32+
type: string
33+
metadata:
34+
type: object
35+
spec:
36+
description: CLIPluginSpec defines the desired state of CLIPlugin.
37+
properties:
38+
artifacts:
39+
additionalProperties:
40+
description: ArtifactList contains an Artifact object for every
41+
supported platform of a version.
42+
items:
43+
description: Artifact points to an individual plugin binary specific
44+
to a version and platform.
45+
properties:
46+
arch:
47+
description: Arch is CPU architecture of the plugin binary
48+
in `GOARCH` format.
49+
type: string
50+
digest:
51+
description: SHA256 hash of the plugin binary.
52+
type: string
53+
image:
54+
description: Image is a fully qualified OCI image for the
55+
plugin binary.
56+
type: string
57+
os:
58+
description: OS of the plugin binary in `GOOS` format.
59+
type: string
60+
type:
61+
description: Type of the binary artifact. Valid values are
62+
S3, GCP, OCIImage.
63+
type: string
64+
uri:
65+
description: AssetURI is a URI of the plugin binary. This
66+
can be a fully qualified HTTP path or a local path.
67+
type: string
68+
required:
69+
- arch
70+
- os
71+
- type
72+
type: object
73+
type: array
74+
description: Artifacts contains an artifact list for every supported
75+
version.
76+
type: object
77+
description:
78+
description: Description is the plugin's description.
79+
type: string
80+
optional:
81+
description: Optional specifies whether the plugin is mandatory or
82+
optional If optional, the plugin will not get auto-downloaded as
83+
part of `tanzu login` or `tanzu plugin sync` command To view the
84+
list of plugin, user can use `tanzu plugin list` and to download
85+
a specific plugin run, `tanzu plugin install <plugin-name>`
86+
type: boolean
87+
recommendedVersion:
88+
description: Recommended version that Tanzu CLI should use if available.
89+
The value should be a valid semantic version as defined in https://semver.org/.
90+
E.g., 2.0.1
91+
type: string
92+
required:
93+
- artifacts
94+
- description
95+
- optional
96+
- recommendedVersion
97+
type: object
98+
required:
99+
- metadata
100+
- spec
101+
type: object
102+
served: true
103+
storage: true

packages/management/core-management-plugins/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
22
kind: PackageMetadata
33
metadata:
44
name: core-management-plugins.tanzu.vmware.com
5-
namespace: core-management-plugins
5+
namespace: tkg-system
66
spec:
77
displayName: "core-management-plugins"
88
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."

packages/management/core-management-plugins/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
22
kind: Package
33
metadata:
44
name: core-management-plugins.tanzu.vmware.com
5-
namespace: core-management-plugins
5+
namespace: tkg-system
66
spec:
77
refName: core-management-plugins.tanzu.vmware.com
88
version: latest

0 commit comments

Comments
 (0)