-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b944ae
commit e621593
Showing
18 changed files
with
1,013 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright 2019-2025 The Liqo Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package v1beta1 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
|
||
liqov1beta1 "github.com/liqotech/liqo/apis/core/v1beta1" | ||
) | ||
|
||
// RenewResource is the name of the renew resources. | ||
var RenewResource = "renews" | ||
|
||
// RenewKind specifies the kind of the renew. | ||
var RenewKind = "Renew" | ||
|
||
// RenewGroupResource is group resource used to register these objects. | ||
var RenewGroupResource = schema.GroupResource{Group: GroupVersion.Group, Resource: RenewResource} | ||
|
||
// RenewGroupVersionResource is groupResourceVersion used to register these objects. | ||
var RenewGroupVersionResource = GroupVersion.WithResource(RenewResource) | ||
|
||
// RenewSpec defines the desired state of Renew. | ||
type RenewSpec struct { | ||
// ConsumerClusterID is the id of the consumer cluster. | ||
ConsumerClusterID liqov1beta1.ClusterID `json:"consumerClusterID,omitempty"` | ||
// PublicKey is the public key of the tenant cluster. | ||
PublicKey []byte `json:"publicKey,omitempty"` | ||
// CSR is the Certificate Signing Request of the tenant cluster. | ||
CSR []byte `json:"csr,omitempty"` | ||
// IdentityType is the type of the identity. | ||
IdentityType IdentityType `json:"identityType,omitempty"` | ||
// ResoruceSliceRef is the reference to the resource slice. | ||
ResourceSliceRef *corev1.LocalObjectReference `json:"resourceSliceRef,omitempty"` | ||
} | ||
|
||
// RenewStatus defines the observed state of Renew. | ||
type RenewStatus struct { | ||
// AuthParams contains the authentication parameters for the consumer cluster. | ||
AuthParams *AuthParams `json:"authParams,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:resource:categories=liqo | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` | ||
|
||
// Renew represents a slice of resources given by the provider cluster to the consumer cluster. | ||
type Renew struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec RenewSpec `json:"spec,omitempty"` | ||
Status RenewStatus `json:"status,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// RenewList contains a list of Renews. | ||
type RenewList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []Renew `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&Renew{}, &RenewList{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
deployments/liqo/charts/liqo-crds/crds/authentication.liqo.io_renews.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.16.3 | ||
name: renews.authentication.liqo.io | ||
spec: | ||
group: authentication.liqo.io | ||
names: | ||
categories: | ||
- liqo | ||
kind: Renew | ||
listKind: RenewList | ||
plural: renews | ||
singular: renew | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
name: v1beta1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Renew represents a slice of resources given by the provider cluster | ||
to the consumer cluster. | ||
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: RenewSpec defines the desired state of Renew. | ||
properties: | ||
consumerClusterID: | ||
description: ConsumerClusterID is the id of the consumer cluster. | ||
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ | ||
type: string | ||
csr: | ||
description: CSR is the Certificate Signing Request of the tenant | ||
cluster. | ||
format: byte | ||
type: string | ||
identityType: | ||
description: IdentityType is the type of the identity. | ||
type: string | ||
publicKey: | ||
description: PublicKey is the public key of the tenant cluster. | ||
format: byte | ||
type: string | ||
resourceSliceRef: | ||
description: ResoruceSliceRef is the reference to the resource slice. | ||
properties: | ||
name: | ||
default: "" | ||
description: |- | ||
Name of the referent. | ||
This field is effectively required, but due to backwards compatibility is | ||
allowed to be empty. Instances of this type with an empty value here are | ||
almost certainly wrong. | ||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | ||
type: string | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
type: object | ||
status: | ||
description: RenewStatus defines the observed state of Renew. | ||
properties: | ||
authParams: | ||
description: AuthParams contains the authentication parameters for | ||
the consumer cluster. | ||
properties: | ||
apiServer: | ||
type: string | ||
awsConfig: | ||
description: AwsConfig contains the AWS configuration and access | ||
key for the Liqo user and the current EKS cluster. | ||
properties: | ||
awsAccessKeyID: | ||
type: string | ||
awsClusterName: | ||
type: string | ||
awsRegion: | ||
type: string | ||
awsSecretAccessKey: | ||
type: string | ||
awsUserArn: | ||
type: string | ||
required: | ||
- awsAccessKeyID | ||
- awsClusterName | ||
- awsRegion | ||
- awsSecretAccessKey | ||
- awsUserArn | ||
type: object | ||
ca: | ||
format: byte | ||
type: string | ||
proxyURL: | ||
type: string | ||
signedCRT: | ||
format: byte | ||
type: string | ||
type: object | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
Oops, something went wrong.