Skip to content

Conversation

buu-nguyen
Copy link

  • Introduces InitContainers to CommonSpec and BaseSpec to allow initial setup containers before application pods start.
  • Adds EnvFrom to CommonSpec and BaseSpec for improved environment variable management from external sources.
  • Enhances NewPodTemplateSpec functions to handle the new fields.

- Introduces `InitContainers` to `CommonSpec` and `BaseSpec` to allow initial setup containers before application pods start.
- Adds `EnvFrom` to `CommonSpec` and `BaseSpec` for improved environment variable management from external sources.
- Enhances `NewPodTemplateSpec` functions to handle the new fields.

//EnvFrom is a list of sources to populate environment variables in the container, the default is empty.
//+optional
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'EnvFrom' defined in DCR is not passed into the actual 'PodTemplateSpec' construction


// InitContainers is a list of containers that should be run before the app containers are started.
// +optional
InitContainers []corev1.Container `json:"initContainers,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'InitContainers' defined in DDC are not passed into the actual 'PodTemplateSpec' construction

Copy link
Contributor

@catpineapple catpineapple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, I also noticed a detail that the InitContainers configured in the CRD should be behind the InitContainer with the default configuration provided by the Operator, so as to meet the user's expectations for changes to the pod environment and be able to overwrite the default configuration. The relevant logic needs to involve changes to the functions 'constructInitContainers' and 'constructDisaggregatedInitContainers' in pkg/common/resource/pod.go.

@catpineapple
Copy link
Contributor

Thank you for your submission, this is a very necessary work for doris operator. It needs to be explained that the doris operator contains two CRDs, so the addition or change of the processing logic needs to pay attention to two sets of implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants