-
Notifications
You must be signed in to change notification settings - Fork 467
/
types_credentialsbinding.go
51 lines (43 loc) · 1.6 KB
/
types_credentialsbinding.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
package security
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CredentialsBinding represents a binding to credentials in the same or another namespace.
type CredentialsBinding struct {
metav1.TypeMeta
// Standard object metadata.
metav1.ObjectMeta
// Provider defines the provider type of the CredentialsBinding.
// This field is immutable.
Provider CredentialsBindingProvider
// CredentialsRef is a reference to a resource holding the credentials.
// Accepted resources are core/v1.Secret and security.gardener.cloud/v1alpha1.WorkloadIdentity
CredentialsRef corev1.ObjectReference
// Quotas is a list of references to Quota objects in the same or another namespace.
// This field is immutable.
Quotas []corev1.ObjectReference
}
// GetProviderType gets the type of the provider.
func (cb *CredentialsBinding) GetProviderType() string {
return cb.Provider.Type
}
// CredentialsBindingProvider defines the provider type of the CredentialsBinding.
type CredentialsBindingProvider struct {
// Type is the type of the provider.
Type string
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CredentialsBindingList is a collection of CredentialsBindings.
type CredentialsBindingList struct {
metav1.TypeMeta
// Standard list object metadata.
metav1.ListMeta
// Items is the list of CredentialsBindings.
Items []CredentialsBinding
}