From 6b6547649df23af965ded3c738d350b46a21588a Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Tue, 5 Dec 2023 11:00:26 +0300 Subject: [PATCH 1/6] refactor(cm): create empty config map content --- internal/shared.go | 159 ++++++++++++++++++++++++++------------------- 1 file changed, 92 insertions(+), 67 deletions(-) diff --git a/internal/shared.go b/internal/shared.go index 83e81118..c37a6ae3 100644 --- a/internal/shared.go +++ b/internal/shared.go @@ -88,6 +88,7 @@ const ( INGRESS_IDE_POSTFIX = "" CUSTOM_PORT_SVC_IDE_POSTFIX = "-custom" CUSTOM_PORT_INGRESS_IDE_POSTFIX = "-custom" + CONFIGMAP_IDE_POSTFIX = "" ) // RobotDevSuite owned resources' postfixes @@ -105,45 +106,40 @@ const ( X11_UNIX_PATH = "/tmp/.X11-unix" ) -// Super client configuration const ( - SUPER_CLIENT_CONFIG = "" + - "" + - "" + - " " + - " " + - " " + - " udp_transport" + - " UDPv4" + - " " + - " " + - " " + - " " + - " " + - " udp_transport" + - " " + - " false" + - " " + - " " + - " SUPER_CLIENT" + - " " + - " " + - " " + - " " + - " " + - "
" + "%s" + "
" + - " 11811" + - "
" + - "
" + - "
" + - "
" + - "
" + - "
" + - "
" + - "
" + - "
" + - "
" + - "
" + IMAGE_MAP_CONFIG_MAP_NAME = "platform" + IMAGE_MAP_CONFIG_MAP_NAMESPACE = "kube-system" + IMAGE_MAP_CONFIG_MAP_DATA_KEY = "platform.yaml" + IMAGE_MAP_URL = "https://raw.githubusercontent.com/robolaunch/robolaunch/main/platform.yaml" +) + +// Commands for collecting metrics +const ( + CMD_GET_CPU = "cat /sys/fs/cgroup/cpu/cpuacct.usage" + CMD_GET_MEMORY = "cat /sys/fs/cgroup/memory/memory.usage_in_bytes" + CMD_GET_NETWORK_LOAD = "cat /proc/net/dev | awk -F ' ' '{print $1 $2 \":\" $10}' | tail -n+3" +) + +const ( + GRANT_PERMISSION_KEY = "GRANT_PERMISSION" + PERSISTENT_DIRS_KEY = "PERSISTENT_DIRS" + HOST_DIRS_KEY = "HOST_DIRS" + IDE_CUSTOM_PORT_RANGE_KEY = "IDE_CUSTOM_PORT_RANGE" + VDI_CUSTOM_PORT_RANGE_KEY = "VDI_CUSTOM_PORT_RANGE" +) + +// regex +const ( + GRANT_PERMISSION_REGEX = "^(/([A-Za-z0-9./_-])+:)*(/[A-Za-z0-9./_-]+)$" + PERSISTENT_DIRS_REGEX = "^(/([A-Za-z0-9./_-])+:)*(/[A-Za-z0-9./_-]+)$" + HOST_DIRS_REGEX = "^(((/[A-Za-z0-9./_-]+):(/[A-Za-z0-9./_-]+))+,)*(((/[A-Za-z0-9./_-]+):(/[A-Za-z0-9./_-]+))+)$" + CUSTOM_PORT_RANGE_REGEX = "^([a-z0-9]{4}-[0-9]{5}:[0-9]{2,5}/)*([a-z0-9]{4}-[0-9]{5}:[0-9]{2,5})$" +) + +// file browser ports +const ( + FILE_BROWSER_PORT_NAME = "filebrowser" + FILE_BROWSER_PORT = 2000 ) // Ingress annotations @@ -184,40 +180,69 @@ const ( "}" ) -const ( - IMAGE_MAP_CONFIG_MAP_NAME = "platform" - IMAGE_MAP_CONFIG_MAP_NAMESPACE = "kube-system" - IMAGE_MAP_CONFIG_MAP_DATA_KEY = "platform.yaml" - IMAGE_MAP_URL = "https://raw.githubusercontent.com/robolaunch/robolaunch/main/platform.yaml" -) - -// Commands for collecting metrics -const ( - CMD_GET_CPU = "cat /sys/fs/cgroup/cpu/cpuacct.usage" - CMD_GET_MEMORY = "cat /sys/fs/cgroup/memory/memory.usage_in_bytes" - CMD_GET_NETWORK_LOAD = "cat /proc/net/dev | awk -F ' ' '{print $1 $2 \":\" $10}' | tail -n+3" -) +// File contents +// Super client configuration const ( - GRANT_PERMISSION_KEY = "GRANT_PERMISSION" - PERSISTENT_DIRS_KEY = "PERSISTENT_DIRS" - HOST_DIRS_KEY = "HOST_DIRS" - IDE_CUSTOM_PORT_RANGE_KEY = "IDE_CUSTOM_PORT_RANGE" - VDI_CUSTOM_PORT_RANGE_KEY = "VDI_CUSTOM_PORT_RANGE" -) - -// regex -const ( - GRANT_PERMISSION_REGEX = "^(/([A-Za-z0-9./_-])+:)*(/[A-Za-z0-9./_-]+)$" - PERSISTENT_DIRS_REGEX = "^(/([A-Za-z0-9./_-])+:)*(/[A-Za-z0-9./_-]+)$" - HOST_DIRS_REGEX = "^(((/[A-Za-z0-9./_-]+):(/[A-Za-z0-9./_-]+))+,)*(((/[A-Za-z0-9./_-]+):(/[A-Za-z0-9./_-]+))+)$" - CUSTOM_PORT_RANGE_REGEX = "^([a-z0-9]{4}-[0-9]{5}:[0-9]{2,5}/)*([a-z0-9]{4}-[0-9]{5}:[0-9]{2,5})$" + SUPER_CLIENT_CONFIG = "" + + "" + + "" + + " " + + " " + + " " + + " udp_transport" + + " UDPv4" + + " " + + " " + + " " + + " " + + " " + + " udp_transport" + + " " + + " false" + + " " + + " " + + " SUPER_CLIENT" + + " " + + " " + + " " + + " " + + " " + + "
" + "%s" + "
" + + " 11811" + + "
" + + "
" + + "
" + + "
" + + "
" + + "
" + + "
" + + "
" + + "
" + + "
" + + "
" ) -// file browser ports const ( - FILE_BROWSER_PORT_NAME = "filebrowser" - FILE_BROWSER_PORT = 2000 + CUSTOM_SUPERVISORD_CONFIG = "" + + "# replace your daemon's configuration" + "\n" + + "# for reference, see http://supervisord.org/configuration.html" + "\n" + + "[program:custom]" + "\n" + + "environment=HOME='/home/robolaunch',USER='robolaunch',FILE_BROWSER_PORT='%(ENV_FILE_BROWSER_PORT)s'" + "\n" + + "command=/bin/bash /etc/robolaunch/services/custom/custom.sh" + "\n" + + "stopsignal=INT" + "\n" + + "stopwaitsecs=5" + "\n" + + "autorestart=true" + "\n" + + "priority=800" + "\n" + + "user=robolaunch" + "\n" + + "stdout_logfile=/var/log/services/custom.log" + "\n" + + "stdout_logfile_maxbytes=100MB" + "\n" + + "stdout_logfile_backups=10" + "\n" + + "redirect_stderr=true" + "\n" + CUSTOM_BACKGROUND_SCRIPT = "" + + "#!/bin/bash" + "\n" + + "# replace your autostart script" + "\n" + + "sleep infinity" + "\n" ) func Bash(command string) []string { From ef9cc4c6958a8de203f2c01db0427922fe9d069c Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Tue, 5 Dec 2023 11:03:02 +0300 Subject: [PATCH 2/6] refactor(cm): prepare configmap content --- internal/resources/robot_ide.go | 16 ++++++++++++++++ pkg/api/roboscale.io/v1alpha1/dev_helpers.go | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/internal/resources/robot_ide.go b/internal/resources/robot_ide.go index f2b8049b..e4439a97 100644 --- a/internal/resources/robot_ide.go +++ b/internal/resources/robot_ide.go @@ -374,3 +374,19 @@ func GetRobotIDECustomIngress(robotIDE *robotv1alpha1.RobotIDE, ingressNamespace return ingress } + +func GetRobotIDEConfigMap(robotIDE *robotv1alpha1.RobotIDE, cmNamespacedName *types.NamespacedName, robot robotv1alpha1.Robot) *corev1.ConfigMap { + + cm := &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: cmNamespacedName.Name, + Namespace: cmNamespacedName.Namespace, + }, + Data: map[string]string{ + "custom.conf": internal.CUSTOM_SUPERVISORD_CONFIG, + "custom.sh": internal.CUSTOM_BACKGROUND_SCRIPT, + }, + } + + return cm +} diff --git a/pkg/api/roboscale.io/v1alpha1/dev_helpers.go b/pkg/api/roboscale.io/v1alpha1/dev_helpers.go index dab168ad..71599bb7 100644 --- a/pkg/api/roboscale.io/v1alpha1/dev_helpers.go +++ b/pkg/api/roboscale.io/v1alpha1/dev_helpers.go @@ -89,6 +89,13 @@ func (robotide *RobotIDE) GetRobotIDECustomIngressMetadata() *types.NamespacedNa } } +func (robotide *RobotIDE) GetRobotIDEConfigMapMetadata() *types.NamespacedName { + return &types.NamespacedName{ + Namespace: robotide.Namespace, + Name: robotide.Name + internal.CONFIGMAP_IDE_POSTFIX, + } +} + // ******************************** // RobotVDI helpers // ******************************** From 308aaefb31fe87e8dc1796750dbc80f1da0b6a4f Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Tue, 5 Dec 2023 11:12:33 +0300 Subject: [PATCH 3/6] refactor(cm): add configuration for injecting background app's files --- internal/configure/background.go | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 internal/configure/background.go diff --git a/internal/configure/background.go b/internal/configure/background.go new file mode 100644 index 00000000..44b47851 --- /dev/null +++ b/internal/configure/background.go @@ -0,0 +1,49 @@ +package configure + +import ( + corev1 "k8s.io/api/core/v1" +) + +func (cfg *PodConfigInjector) InjectBackgroundConfigFiles(pod *corev1.Pod, configMap corev1.ConfigMap) *corev1.Pod { + + cfg.placeBackgroundConfigFiles(pod, configMap) + + return pod +} + +func (cfg *PodConfigInjector) placeBackgroundConfigFiles(pod *corev1.Pod, configMap corev1.ConfigMap) { + + var mode int32 = 511 + + volume := corev1.Volume{ + Name: "background-config", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: configMap.Name, + }, + }, + }, + } + + for key := range configMap.Data { + volume.VolumeSource.ConfigMap.Items = append(volume.VolumeSource.ConfigMap.Items, corev1.KeyToPath{ + Key: key, + Path: key, + Mode: &mode, + }) + } + + pod.Spec.Volumes = append(pod.Spec.Volumes, volume) + + volumeMount := corev1.VolumeMount{ + Name: "background-config", + MountPath: "/etc/robolaunch/services/config/", + } + + for k, container := range pod.Spec.Containers { + container.VolumeMounts = append(container.VolumeMounts, volumeMount) + pod.Spec.Containers[k] = container + } + +} From 26cb14ced7cccb879785586d9788b01a329da697 Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Tue, 5 Dec 2023 11:56:35 +0300 Subject: [PATCH 4/6] refactor(api): add cm status fields for robotide --- pkg/api/roboscale.io/v1alpha1/dev_types.go | 2 ++ pkg/api/roboscale.io/v1alpha1/phases.go | 1 + pkg/api/roboscale.io/v1alpha1/zz_generated.deepcopy.go | 1 + 3 files changed, 4 insertions(+) diff --git a/pkg/api/roboscale.io/v1alpha1/dev_types.go b/pkg/api/roboscale.io/v1alpha1/dev_types.go index 55287c35..ab2d8202 100644 --- a/pkg/api/roboscale.io/v1alpha1/dev_types.go +++ b/pkg/api/roboscale.io/v1alpha1/dev_types.go @@ -187,6 +187,8 @@ type RobotIDEStatus struct { CustomPortServiceStatus OwnedServiceStatus `json:"customPortServiceStatus,omitempty"` // Status of Cloud IDE ingress for custom ports service. Created only if the robot has an additional config with key `IDE_CUSTOM_PORT_RANGE` and `.spec.ingress` is `true`. CustomPortIngressStatus OwnedResourceStatus `json:"customPortIngressStatus,omitempty"` + // Config map status. It's used to add background apps. + ConfigMapStatus OwnedResourceStatus `json:"configMapStatus,omitempty"` } // ******************************** diff --git a/pkg/api/roboscale.io/v1alpha1/phases.go b/pkg/api/roboscale.io/v1alpha1/phases.go index fa14c127..c9b39083 100644 --- a/pkg/api/roboscale.io/v1alpha1/phases.go +++ b/pkg/api/roboscale.io/v1alpha1/phases.go @@ -109,6 +109,7 @@ const ( RobotIDEPhaseCreatingIngress RobotIDEPhase = "CreatingIngress" RobotIDEPhaseCreatingCustomPortService RobotIDEPhase = "CreatingCustomPortService" RobotIDEPhaseCreatingCustomPortIngress RobotIDEPhase = "CreatingCustomPortIngress" + RobotIDEPhaseCreatingConfigMap RobotIDEPhase = "CreatingConfigMap" RobotIDEPhaseRunning RobotIDEPhase = "Running" ) diff --git a/pkg/api/roboscale.io/v1alpha1/zz_generated.deepcopy.go b/pkg/api/roboscale.io/v1alpha1/zz_generated.deepcopy.go index 3d891e49..c40eae78 100644 --- a/pkg/api/roboscale.io/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/api/roboscale.io/v1alpha1/zz_generated.deepcopy.go @@ -1529,6 +1529,7 @@ func (in *RobotIDEStatus) DeepCopyInto(out *RobotIDEStatus) { out.ServiceExportStatus = in.ServiceExportStatus in.CustomPortServiceStatus.DeepCopyInto(&out.CustomPortServiceStatus) out.CustomPortIngressStatus = in.CustomPortIngressStatus + out.ConfigMapStatus = in.ConfigMapStatus } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RobotIDEStatus. From 901d3b57b61ce54c657e236c532df5dd82c2b3fe Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Tue, 5 Dec 2023 11:57:53 +0300 Subject: [PATCH 5/6] refactor(mount): create cm for custom background ide apps and mount it to ide pod --- internal/configure/background.go | 2 +- internal/resources/robot_ide.go | 5 ++-- .../robot_dev_suite/robot_ide/check.go | 18 +++++++++++ .../robot_dev_suite/robot_ide/create.go | 30 ++++++++++++++++++- .../robot_dev_suite/robot_ide/handle.go | 20 +++++++++++++ .../robot_ide/robotide_controller.go | 15 ++++++++-- 6 files changed, 84 insertions(+), 6 deletions(-) diff --git a/internal/configure/background.go b/internal/configure/background.go index 44b47851..7105b795 100644 --- a/internal/configure/background.go +++ b/internal/configure/background.go @@ -38,7 +38,7 @@ func (cfg *PodConfigInjector) placeBackgroundConfigFiles(pod *corev1.Pod, config volumeMount := corev1.VolumeMount{ Name: "background-config", - MountPath: "/etc/robolaunch/services/config/", + MountPath: "/etc/robolaunch/services/custom/", } for k, container := range pod.Spec.Containers { diff --git a/internal/resources/robot_ide.go b/internal/resources/robot_ide.go index e4439a97..52957f85 100644 --- a/internal/resources/robot_ide.go +++ b/internal/resources/robot_ide.go @@ -29,7 +29,7 @@ func getRobotIDESelector(robotIDE robotv1alpha1.RobotIDE) map[string]string { } } -func GetRobotIDEPod(robotIDE *robotv1alpha1.RobotIDE, podNamespacedName *types.NamespacedName, robot robotv1alpha1.Robot, robotVDI robotv1alpha1.RobotVDI, node corev1.Node) *corev1.Pod { +func GetRobotIDEPod(robotIDE *robotv1alpha1.RobotIDE, podNamespacedName *types.NamespacedName, robot robotv1alpha1.Robot, robotVDI robotv1alpha1.RobotVDI, node corev1.Node, cm corev1.ConfigMap) *corev1.Pod { podCfg := configure.PodConfigInjector{} containerCfg := configure.ContainerConfigInjector{} @@ -97,6 +97,7 @@ func GetRobotIDEPod(robotIDE *robotv1alpha1.RobotIDE, podNamespacedName *types.N podCfg.InjectImagePullPolicy(&idePod) podCfg.SchedulePod(&idePod, robotIDE) podCfg.InjectVolumeConfiguration(&idePod, robot) + podCfg.InjectBackgroundConfigFiles(&idePod, cm) podCfg.InjectGenericEnvironmentVariables(&idePod, robot) podCfg.InjectRuntimeClass(&idePod, robot, node) if robotIDE.Spec.Display && label.GetTargetRobotVDI(robotIDE) != "" { @@ -375,7 +376,7 @@ func GetRobotIDECustomIngress(robotIDE *robotv1alpha1.RobotIDE, ingressNamespace return ingress } -func GetRobotIDEConfigMap(robotIDE *robotv1alpha1.RobotIDE, cmNamespacedName *types.NamespacedName, robot robotv1alpha1.Robot) *corev1.ConfigMap { +func GetRobotIDEConfigMap(robotIDE *robotv1alpha1.RobotIDE, cmNamespacedName *types.NamespacedName) *corev1.ConfigMap { cm := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/controllers/robot_dev_suite/robot_ide/check.go b/pkg/controllers/robot_dev_suite/robot_ide/check.go index dac2dcfb..d45da33f 100644 --- a/pkg/controllers/robot_dev_suite/robot_ide/check.go +++ b/pkg/controllers/robot_dev_suite/robot_ide/check.go @@ -163,3 +163,21 @@ func (r *RobotIDEReconciler) reconcileCheckCustomIngress(ctx context.Context, in return nil } + +func (r *RobotIDEReconciler) reconcileCheckConfigMap(ctx context.Context, instance *robotv1alpha1.RobotIDE) error { + + cmQuery := &corev1.ConfigMap{} + err := r.Get(ctx, *instance.GetRobotIDEConfigMapMetadata(), cmQuery) + if err != nil { + if errors.IsNotFound(err) { + instance.Status.ConfigMapStatus = robotv1alpha1.OwnedResourceStatus{} + } else { + return err + } + } else { + instance.Status.ConfigMapStatus.Created = true + reference.SetReference(&instance.Status.IngressStatus.Reference, cmQuery.TypeMeta, cmQuery.ObjectMeta) + } + + return nil +} diff --git a/pkg/controllers/robot_dev_suite/robot_ide/create.go b/pkg/controllers/robot_dev_suite/robot_ide/create.go index a143b1dd..5f6a4662 100644 --- a/pkg/controllers/robot_dev_suite/robot_ide/create.go +++ b/pkg/controllers/robot_dev_suite/robot_ide/create.go @@ -6,6 +6,7 @@ import ( "github.com/robolaunch/robot-operator/internal/label" "github.com/robolaunch/robot-operator/internal/resources" robotv1alpha1 "github.com/robolaunch/robot-operator/pkg/api/roboscale.io/v1alpha1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" ctrl "sigs.k8s.io/controller-runtime" ) @@ -51,7 +52,13 @@ func (r *RobotIDEReconciler) reconcileCreatePod(ctx context.Context, instance *r return err } - idePod := resources.GetRobotIDEPod(instance, instance.GetRobotIDEPodMetadata(), *robot, *robotVDI, *activeNode) + cm := corev1.ConfigMap{} + err = r.Get(ctx, *instance.GetRobotIDEConfigMapMetadata(), &cm) + if err != nil { + return err + } + + idePod := resources.GetRobotIDEPod(instance, instance.GetRobotIDEPodMetadata(), *robot, *robotVDI, *activeNode, cm) err = ctrl.SetControllerReference(instance, idePod, r.Scheme) if err != nil { @@ -168,3 +175,24 @@ func (r *RobotIDEReconciler) reconcileCreateCustomIngress(ctx context.Context, i return nil } + +func (r *RobotIDEReconciler) reconcileCreateConfigMap(ctx context.Context, instance *robotv1alpha1.RobotIDE) error { + + ideCm := resources.GetRobotIDEConfigMap(instance, instance.GetRobotIDEConfigMapMetadata()) + + err := ctrl.SetControllerReference(instance, ideCm, r.Scheme) + if err != nil { + return err + } + + err = r.Create(ctx, ideCm) + if err != nil && errors.IsAlreadyExists(err) { + return nil + } else if err != nil { + return err + } + + logger.Info("STATUS: IDE config map is created.") + + return nil +} diff --git a/pkg/controllers/robot_dev_suite/robot_ide/handle.go b/pkg/controllers/robot_dev_suite/robot_ide/handle.go index 76ba95d9..68eaa435 100644 --- a/pkg/controllers/robot_dev_suite/robot_ide/handle.go +++ b/pkg/controllers/robot_dev_suite/robot_ide/handle.go @@ -157,3 +157,23 @@ func (r *RobotIDEReconciler) reconcileHandleCustomIngress(ctx context.Context, i return nil } + +func (r *RobotIDEReconciler) reconcileHandleConfigMap(ctx context.Context, instance *robotv1alpha1.RobotIDE) error { + + if !instance.Status.ConfigMapStatus.Created { + instance.Status.Phase = robotv1alpha1.RobotIDEPhaseCreatingConfigMap + err := r.reconcileCreateConfigMap(ctx, instance) + if err != nil { + return err + } + instance.Status.ConfigMapStatus.Created = true + + return &robotErr.CreatingResourceError{ + ResourceKind: "ConfigMap", + ResourceName: instance.GetRobotIDEConfigMapMetadata().Name, + ResourceNamespace: instance.GetRobotIDEConfigMapMetadata().Namespace, + } + } + + return nil +} diff --git a/pkg/controllers/robot_dev_suite/robot_ide/robotide_controller.go b/pkg/controllers/robot_dev_suite/robot_ide/robotide_controller.go index 537ed80e..59583ea6 100644 --- a/pkg/controllers/robot_dev_suite/robot_ide/robotide_controller.go +++ b/pkg/controllers/robot_dev_suite/robot_ide/robotide_controller.go @@ -95,7 +95,12 @@ func (r *RobotIDEReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c func (r *RobotIDEReconciler) reconcileCheckStatus(ctx context.Context, instance *robotv1alpha1.RobotIDE, result *ctrl.Result) error { - err := r.reconcileHandleService(ctx, instance) + err := r.reconcileHandleConfigMap(ctx, instance) + if err != nil { + return robotErr.CheckCreatingOrWaitingError(result, err) + } + + err = r.reconcileHandleService(ctx, instance) if err != nil { return robotErr.CheckCreatingOrWaitingError(result, err) } @@ -132,7 +137,12 @@ func (r *RobotIDEReconciler) reconcileCheckStatus(ctx context.Context, instance func (r *RobotIDEReconciler) reconcileCheckResources(ctx context.Context, instance *robotv1alpha1.RobotIDE) error { - err := r.reconcileCheckService(ctx, instance) + err := r.reconcileCheckConfigMap(ctx, instance) + if err != nil { + return err + } + + err = r.reconcileCheckService(ctx, instance) if err != nil { return err } @@ -175,5 +185,6 @@ func (r *RobotIDEReconciler) SetupWithManager(mgr ctrl.Manager) error { Owns(&corev1.Service{}). Owns(&networkingv1.Ingress{}). Owns(&mcsv1alpha1.ServiceExport{}). + Owns(&corev1.ConfigMap{}). Complete(r) } From 4f892df41a3f972eb62e505afadb2cb738380faa Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Tue, 5 Dec 2023 13:57:59 +0300 Subject: [PATCH 6/6] build(manifests): :whale: update internal manifests --- .../bases/robot.roboscale.io_robotides.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/config/crd/bases/robot.roboscale.io_robotides.yaml b/config/crd/bases/robot.roboscale.io_robotides.yaml index 16d5cc87..7da67b47 100644 --- a/config/crd/bases/robot.roboscale.io_robotides.yaml +++ b/config/crd/bases/robot.roboscale.io_robotides.yaml @@ -95,6 +95,55 @@ spec: status: description: Most recently observed status of the RobotIDE. properties: + configMapStatus: + description: Config map status. It's used to add background apps. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object customPortIngressStatus: description: Status of Cloud IDE ingress for custom ports service. Created only if the robot has an additional config with key `IDE_CUSTOM_PORT_RANGE`