This repository was archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 274
apis: add MeshRootCertificate API types #4677
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,106 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// MeshRootCertificate defines the configuration for certificate issuing | ||
// by the mesh control plane | ||
// +genclient | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
type MeshRootCertificate struct { | ||
// Object's type metadata | ||
metav1.TypeMeta `json:",inline"` | ||
|
||
// Object's metadata | ||
// +optional | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// Spec is the MeshRootCertificate config specification | ||
// +optional | ||
Spec MeshRootCertificateSpec `json:"spec,omitempty"` | ||
|
||
// Status of the MeshRootCertificate resource | ||
// +optional | ||
Status MeshRootCertificateStatus `json:"status,omitempty"` | ||
} | ||
|
||
// MeshRootCertificateSpec defines the mesh root certificate specification | ||
type MeshRootCertificateSpec struct { | ||
// Provider specifies the mesh certificate provider | ||
// +optional | ||
Provider *ProviderSpec `json:"provider,omitempty"` | ||
} | ||
|
||
// ProviderSpec defines the certificate provider used by the mesh control plane | ||
type ProviderSpec struct { | ||
// CertManager specifies the cert-manager provider configuration | ||
// +optional | ||
CertManager *CertManagerProviderSpec `json:"certManager,omitempty"` | ||
|
||
// Vault specifies the vault provider configuration | ||
// +optional | ||
Vault *VaultProviderSpec `json:"vault,omitempty"` | ||
|
||
// Tresor specifies the Tresor provider configuration | ||
// +optional | ||
Tresor *TresorProviderSpec `json:"tresor,omitempty"` | ||
} | ||
|
||
// CertManagerProviderSpec defines the configuration of the cert-manager provider | ||
type CertManagerProviderSpec struct { | ||
// SecretName specifies the name of the k8s secret containing the root certificate | ||
SecretName string `json:"secretName"` | ||
|
||
// IssuerName specifies the name of the Issuer resource | ||
IssuerName string `json:"issuerName"` | ||
|
||
// IssuerKind specifies the kind of Issuer | ||
IssuerKind string `json:"issuerKind"` | ||
|
||
// IssuerGroup specifies the group the Issuer belongs to | ||
IssuerGroup string `json:"issuerGroup"` | ||
} | ||
|
||
// VaultProviderSpec defines the configuration of the Vault provider | ||
type VaultProviderSpec struct { | ||
// Host specifies the name of the Vault server | ||
Host string `json:"host"` | ||
|
||
// Role specifies the name of the role for use by mesh control plane | ||
Role string `json:"role"` | ||
|
||
// Protocol specifies the protocol for connections to Vault | ||
Protocol string `json:"protocol"` | ||
|
||
// Token specifies the name of the token to be used by mesh control plane | ||
// to connect to Vault | ||
Token string `json:"token"` | ||
} | ||
|
||
// TresorProviderSpec defines the configuration of the Tresor provider | ||
type TresorProviderSpec struct { | ||
// SecretName specifies the name of the secret storing the root certificate | ||
SecretName string `json:"secretName"` | ||
} | ||
|
||
// MeshRootCertificateStatus defines the status of the MeshRootCertificate resource | ||
type MeshRootCertificateStatus struct { | ||
// State specifies the state of the root certificate rotation | ||
State string `json:"state"` | ||
|
||
// RotationStage specifies the stage of the rotation indicating how a | ||
// root certificate is currently being used within the mesh. The exact | ||
// meaning of the RotationStage status is determined by the accompanying | ||
// State status | ||
RotationStage string `json:"rotationStage"` | ||
} | ||
|
||
// MeshRootCertificateList defines the list of MeshRootCertificate objects | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
type MeshRootCertificateList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata"` | ||
|
||
Items []MeshRootCertificate `json:"items"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
pkg/gen/client/config/clientset/versioned/typed/config/v1alpha1/config_client.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
pkg/gen/client/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason the only field in the spec is optional? Does an empty spec mean something?