优化 DevcontainerApp Reconciler 逻辑:

- 将 NodePort 调度结果放在 app.Status 域,避免修改 Spec 导致 NodePort Service 重复创建
- 将 namespace 修改成 devstar-studio-ns,防止后期整合 RBAC 遇到问题
- 增加 label devstar-resource-type=devstar-devcontainer
This commit is contained in:
Mingchen Dai
2024-09-25 01:32:43 +00:00
parent 75919d52ca
commit 7aa665a314
6 changed files with 39 additions and 18 deletions

View File

@@ -94,6 +94,10 @@ type DevcontainerAppStatus struct {
// Information when was the last time the job was successfully scheduled.
// +optional
LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
// NodePortAssigned 存储 DevcontainerApp CRD调度后集群分配的 NodePort
// +optional
NodePortAssigned uint16 `json:"nodePortAssigned"`
}
// +kubebuilder:object:root=true