Skip to content

Commit

Permalink
feat: support user-defined annotation, env and volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-inf committed Jun 17, 2024
1 parent 0ca2de5 commit 0de4d14
Show file tree
Hide file tree
Showing 17 changed files with 15,112 additions and 4,077 deletions.
17 changes: 17 additions & 0 deletions apis/apps/v1alpha1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,16 @@ type ClusterComponentSpec struct {
// +optional
EnabledLogs []string `json:"enabledLogs,omitempty"`

// Specifies Annotations to override or add for underlying Pods.
//
// +optional
Annotations map[string]string `json:"annotations,omitempty"`

// List of environment variables to add.
//
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`

// Specifies the desired number of replicas in the Component for enhancing availability and durability, or load balancing.
//
// +kubebuilder:validation:Required
Expand Down Expand Up @@ -706,6 +716,11 @@ type ClusterComponentSpec struct {
// +optional
VolumeClaimTemplates []ClusterComponentVolumeClaimTemplate `json:"volumeClaimTemplates,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`

// List of volumes to override.
//
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`

// Overrides services defined in referenced ComponentDefinition and expose endpoints that can be accessed by clients.
//
// +optional
Expand All @@ -716,6 +731,8 @@ type ClusterComponentSpec struct {
// +optional
SystemAccounts []ComponentSystemAccount `json:"systemAccounts,omitempty"`

// Specifies the configuration content of a config template.
//
// +optional
Configs []ClusterComponentConfig `json:"configs,omitempty"`

Expand Down
17 changes: 17 additions & 0 deletions apis/apps/v1alpha1/component_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ type ComponentSpec struct {
// +optional
ServiceRefs []ServiceRef `json:"serviceRefs,omitempty"`

// Specifies Annotations to override or add for underlying Pods.
//
// +optional
Annotations map[string]string `json:"annotations,omitempty"`

// List of environment variables to add.
//
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`

// Specifies the resources required by the Component.
// It allows defining the CPU, memory requirements and limits for the Component's containers.
//
Expand All @@ -82,6 +92,11 @@ type ComponentSpec struct {
// +patchStrategy=merge,retainKeys
VolumeClaimTemplates []ClusterComponentVolumeClaimTemplate `json:"volumeClaimTemplates,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`

// List of volumes to override.
//
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`

// Overrides Services defined in referenced ComponentDefinition and exposes endpoints that can be accessed
// by clients.
//
Expand All @@ -100,6 +115,8 @@ type ComponentSpec struct {
// +kubebuilder:default=1
Replicas int32 `json:"replicas"`

// Specifies the configuration content of a config template.
//
// +optional
Configs []ClusterComponentConfig `json:"configs,omitempty"`

Expand Down
42 changes: 42 additions & 0 deletions apis/apps/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0de4d14

Please sign in to comment.