Skip to content

Commit

Permalink
fix: kmp spec json tag using incorrect values & add refresh interval …
Browse files Browse the repository at this point in the history
…description
  • Loading branch information
duffney committed Aug 9, 2024
1 parent 98ce6ac commit 060fd3e
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 184 deletions.
3 changes: 2 additions & 1 deletion api/v1beta1/keymanagementproviders_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ type KeyManagementProviderSpec struct {
// Name of the key management provider
Type string `json:"type,omitempty"`

// Refresh interval for fetching the certificate/key files from the provider. Only for providers that are refreshable. The value is in the format of "1h30m" where "h" means hour and "m" means minute. Valid time units are units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
// +kubebuilder:default=""
RefreshInterval string `json:"interval,omitempty"`
RefreshInterval string `json:"refreshinterval,omitempty"`

// +kubebuilder:pruning:PreserveUnknownFields
// Parameters of the key management provider
Expand Down
3 changes: 2 additions & 1 deletion api/v1beta1/namespacedkeymanagementprovider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ type NamespacedKeyManagementProviderSpec struct {
// Name of the key management provider
Type string `json:"type,omitempty"`

// Refresh interval for the key management provider. Only used if the key management provider is refreshable. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
// +kubebuilder:default=""
RefreshInterval string `json:"interval,omitempty"`
RefreshInterval string `json:"refreshinterval,omitempty"`

// +kubebuilder:pruning:PreserveUnknownFields
// Parameters of the key management provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ spec:
description: KeyManagementProviderSpec defines the desired state of KeyManagementProvider
properties:
refreshinterval:
description:
Refresh interval for fetching the certificate/key files from the provider. Only
applicable for providers that are refreshable. The value is in the format of "1h30m"
where "h" means hour and "m" means minute. Valid time units are units are
"ns", "us" (or "µs"), "ms", "s", "m", "h".
default: ""
description:
Refresh interval for fetching the certificate/key files
from the provider. Only for providers that are refreshable. The
value is in the format of "1h30m" where "h" means hour and "m" means
minute. Valid time units are units are "ns", "us" (or "µs"), "ms",
"s", "m", "h".
type: string
parameters:
description: Parameters of the key management provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ spec:
of NamespacedKeyManagementProvider
properties:
refreshinterval:
description:
Refresh interval for fetching the certificate/key files from the provider. Only
applicable for providers that are refreshable. The value is in the format of "1h30m"
where "h" means hour and "m" means minute. Valid time units are units are
"ns", "us" (or "µs"), "ms", "s", "m", "h".
default: ""
description:
Refresh interval for fetching the certificate/key files
from the provider. Only for providers that are refreshable. The
value is in the format of "1h30m" where "h" means hour and "m" means
minute. Valid time units are units are "ns", "us" (or "µs"), "ms",
"s", "m", "h".
type: string
parameters:
description: Parameters of the key management provider
Expand Down
167 changes: 82 additions & 85 deletions config/crd/bases/config.ratify.deislabs.io_keymanagementproviders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,89 +14,86 @@ spec:
singular: keymanagementprovider
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .status.issuccess
name: IsSuccess
type: boolean
- jsonPath: .status.brieferror
name: Error
type: string
- jsonPath: .status.lastfetchedtime
name: LastFetchedTime
type: date
name: v1beta1
schema:
openAPIV3Schema:
description:
KeyManagementProvider is the Schema for the keymanagementproviders
API
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 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: KeyManagementProviderSpec defines the desired state of KeyManagementProvider
- additionalPrinterColumns:
- jsonPath: .status.issuccess
name: IsSuccess
type: boolean
- jsonPath: .status.brieferror
name: Error
type: string
- jsonPath: .status.lastfetchedtime
name: LastFetchedTime
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: KeyManagementProvider is the Schema for the keymanagementproviders
API
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 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: KeyManagementProviderSpec defines the desired state of KeyManagementProvider
properties:
parameters:
description: Parameters of the key management provider
type: object
x-kubernetes-preserve-unknown-fields: true
refreshinterval:
default: ""
description: Refresh interval for fetching the certificate/key files
from the provider. Only for providers that are refreshable. The
value is in the format of "1h30m" where "h" means hour and "m" means
minute. Valid time units are units are "ns", "us" (or "µs"), "ms",
"s", "m", "h".
type: string
type:
description: Name of the key management provider
type: string
type: object
status:
description: KeyManagementProviderStatus defines the observed state of
KeyManagementProvider
properties:
brieferror:
description: Truncated error message if the message is too long
type: string
error:
description: Error message if operation was unsuccessful
type: string
issuccess:
description: Is successful in loading certificate/key files
type: boolean
lastfetchedtime:
description: The time stamp of last successful certificate/key fetch
operation. If operation failed, last fetched time shows the time
of error
format: date-time
type: string
properties:
refreshinterval:
description:
Refresh interval for fetching the certificate/key files from the provider. Only
applicable for providers that are refreshable. The value is in the format of "1h30m"
where "h" means hour and "m" means minute. Valid time units are units are
"ns", "us" (or "µs"), "ms", "s", "m", "h".
default: ""
type: string
parameters:
description: Parameters of the key management provider
type: object
x-kubernetes-preserve-unknown-fields: true
type:
description: Name of the key management provider
type: string
type: object
status:
description:
KeyManagementProviderStatus defines the observed state of
KeyManagementProvider
properties:
brieferror:
description: Truncated error message if the message is too long
type: string
error:
description: Error message if operation was unsuccessful
type: string
issuccess:
description: Is successful in loading certificate/key files
type: boolean
lastfetchedtime:
description:
The time stamp of last successful certificate/key fetch
operation. If operation failed, last fetched time shows the time
of error
format: date-time
type: string
properties:
description: provider specific properties of the each individual certificate/key
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- issuccess
type: object
type: object
served: true
storage: true
subresources:
status: {}
description: provider specific properties of the each individual certificate/key
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- issuccess
type: object
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit 060fd3e

Please sign in to comment.