Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Handle CodeEditor Lifecycle #241

Merged
merged 49 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
abd6270
chore(dependencies): add platform server as dependency
tunahanertekin Mar 13, 2024
94b2284
refactor(platform): query platform versions and environments
tunahanertekin Mar 13, 2024
500c041
refactor(platform-meta): add platform meta getter
tunahanertekin Mar 14, 2024
b87ff43
refactor(image): derive tools images
tunahanertekin Mar 14, 2024
b0e0cce
refactor(api): add field for code editor version
tunahanertekin Mar 14, 2024
bae5d13
refactor(image): get image using platform server
tunahanertekin Mar 14, 2024
2ae97c1
refactor(image): get image properties from labels
tunahanertekin Mar 14, 2024
c066b33
refactor(image): use registry info in labels when selecting image
tunahanertekin Mar 14, 2024
5566213
refactor(remote): add remote config injector
tunahanertekin Mar 14, 2024
38e4b44
refactor(deployment): inject remote config if .spec.remote is true
tunahanertekin Mar 14, 2024
ecc6474
refactor(api): add service type field for code editor
tunahanertekin Mar 14, 2024
fa4941d
refactor(service): define code editor service
tunahanertekin Mar 14, 2024
fc03ec3
refactor(api): add service status
tunahanertekin Mar 14, 2024
f9a3ba6
refactor(service): create code editor service
tunahanertekin Mar 14, 2024
e476e89
refactor(selector): add code editor pod service a selector for service
tunahanertekin Mar 14, 2024
123de8c
build(manifests): :whale: update internal manifests
tunahanertekin Mar 14, 2024
e3aae1a
refactor(selector): set pod & service selectors
tunahanertekin Mar 15, 2024
b94b2a1
refactor(cmd): generate cmd for code editor
tunahanertekin Mar 15, 2024
59d8a2d
refactor(deployment): update deployment when remote config or version…
tunahanertekin Mar 15, 2024
08e6558
refactor(deployment): implement version validator webhook
tunahanertekin Mar 15, 2024
89e999d
refactor(deployment): sync volumemounts
tunahanertekin Mar 15, 2024
cb328d6
build(manifests): :whale: update internal manifests
tunahanertekin Mar 15, 2024
8d299da
fix(protocol): switch protocol field from v1.Protocol to string
tunahanertekin Mar 18, 2024
fc264cd
build(manifests): :whale: update internal manifests
tunahanertekin Mar 18, 2024
1d27b00
refactor(webhooks): default ds protocol
tunahanertekin Mar 18, 2024
3155cae
build(manifests): :whale: update internal manifests
tunahanertekin Mar 18, 2024
a7449e5
refactor(ros2workload): delete unused pvcs
tunahanertekin Mar 18, 2024
a0b1980
refactor(codeeditor): delete unused pvcs
tunahanertekin Mar 18, 2024
373eea7
refactor(pvc): update workload when volume config is changed
tunahanertekin Mar 18, 2024
5171c7f
refactor(port): update workload when the code editor port is changed
tunahanertekin Mar 18, 2024
95d245b
refactor(service): update service when the service type is changed
tunahanertekin Mar 18, 2024
319934e
build(manifests): :whale: update internal manifests
tunahanertekin Mar 18, 2024
78e0573
fix(update): remove already exists condition from update to prevent r…
tunahanertekin Mar 19, 2024
885d298
refactor(remote): make remote config dynamic
tunahanertekin Mar 19, 2024
37edb17
refactor(api): add ingress related fields
tunahanertekin Mar 19, 2024
adbedcb
refactor(api): add field for tls secret name
tunahanertekin Mar 19, 2024
06dcd0b
refactor(ingress): define ingress for code editor
tunahanertekin Mar 19, 2024
0d22e05
refactor(ingress): create ingress in reconciliation
tunahanertekin Mar 19, 2024
6ec0d61
chore(rbac): add rbac markers for ingress
tunahanertekin Mar 19, 2024
9547052
refactor(dns): add service dns getters
tunahanertekin Mar 19, 2024
1c0e165
refactor(dns): update filebrowser service path
tunahanertekin Mar 19, 2024
7a15c57
refactor(ingress): make ingress dynamically configurable
tunahanertekin Mar 19, 2024
560010b
build(manifests): :whale: update internal manifests
tunahanertekin Mar 19, 2024
4d40a0d
refactor(events): add event recorder to codeeditor reconciler
tunahanertekin Mar 19, 2024
ead703a
build(manifests): :whale: update internal manifests
tunahanertekin Mar 19, 2024
270e7fc
refactor(events): create events in resource updates
tunahanertekin Mar 20, 2024
44860d8
refactor(deployment): set container statuses
tunahanertekin Mar 20, 2024
730fe87
refactor(codeeditor): calculate object state
tunahanertekin Mar 20, 2024
0ac02de
refactor(event): generate url event in phase calculation
tunahanertekin Mar 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
## [Unreleased]


<a name="v0.2.7-alpha.6.2"></a>
## [v0.2.7-alpha.6.2] - 2024-03-18
### Fix
- **protocol:** switch protocol field from v1.Protocol to string


<a name="v0.2.7-alpha.6"></a>
## [v0.2.7-alpha.6] - 2024-03-06
### Feat
Expand All @@ -11,12 +17,6 @@
- **typo:** fix field reference


<a name="v0.2.7-alpha.4-udp-test-2"></a>
## [v0.2.7-alpha.4-udp-test-2] - 2024-03-04

<a name="v0.2.7-alpha.5"></a>
## [v0.2.7-alpha.5] - 2024-03-04

<a name="v0.2.7-alpha.4"></a>
## [v0.2.7-alpha.4] - 2024-02-15

Expand Down Expand Up @@ -440,10 +440,9 @@
- Merge pull request [#24](https://github.com/robolaunch/robot-operator/issues/24) from robolaunch/23-allow-multiple-launches


[Unreleased]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.6...HEAD
[v0.2.7-alpha.6]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.4-udp-test-2...v0.2.7-alpha.6
[v0.2.7-alpha.4-udp-test-2]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.5...v0.2.7-alpha.4-udp-test-2
[v0.2.7-alpha.5]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.4...v0.2.7-alpha.5
[Unreleased]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.6.2...HEAD
[v0.2.7-alpha.6.2]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.6...v0.2.7-alpha.6.2
[v0.2.7-alpha.6]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.4...v0.2.7-alpha.6
[v0.2.7-alpha.4]: https://github.com/robolaunch/robot-operator/compare/v0.2.7-alpha.1...v0.2.7-alpha.4
[v0.2.7-alpha.1]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.19...v0.2.7-alpha.1
[v0.2.6-alpha.19]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.18...v0.2.6-alpha.19
Expand Down
133 changes: 130 additions & 3 deletions config/crd/bases/robot.roboscale.io_codeeditors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,9 @@ spec:
- name
type: object
type: array
ingress:
description: CodeEditor will create an Ingress resource if `true`.
type: boolean
port:
default: 9000
description: Port that code editor will use inside the container.
Expand All @@ -1813,9 +1816,21 @@ spec:
remote:
description: If `true`, code editor will be consumed remotely.
type: boolean
root:
description: If `true`, code editor will be consumed as `root` user.
type: boolean
serviceType:
default: ClusterIP
description: Service type of CodeEditor. `ClusterIP` and `NodePort`
is supported.
enum:
- ClusterIP
- NodePort
type: string
tlsSecretName:
description: Name of the TLS secret for ingress resource.
type: string
version:
default: 4.22.0
description: App version of the code editor.
type: string
volumeClaimTemplates:
description: Volume templates for ROS 2 workload. For each volume
template, operator will create a PersistentVolumeClaim that can
Expand Down Expand Up @@ -2048,6 +2063,7 @@ spec:
type: array
required:
- port
- version
type: object
status:
description: Most recently observed status of the CodeEditor.
Expand Down Expand Up @@ -2364,6 +2380,55 @@ spec:
type: string
type: object
type: array
ingressStatus:
description: Status of CodeEditor Ingress.
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
phase:
description: Phase of CodeEditor. It sums the general status of code
editor.
Expand Down Expand Up @@ -2515,6 +2580,68 @@ spec:
type: object
type: object
type: array
serviceStatus:
description: Status of code editor service.
properties:
resource:
description: Generic status for any owned resource.
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
urls:
additionalProperties:
type: string
description: Connection URL.
type: object
type: object
workloadUpdateNeeded:
description: Field to indicate if the workload should be restarted.
type: boolean
type: object
type: object
served: true
Expand Down
4 changes: 3 additions & 1 deletion config/crd/bases/robot.roboscale.io_discoveryservers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ spec:
Server's hostname. Used for getting Server's IP over DNS.
type: string
protocol:
default: TCP
enum:
- TCP
- UDP
type: string
reference:
description: Reference to the `Server` instance. It is used if `.spec.type`
Expand Down
4 changes: 3 additions & 1 deletion config/crd/bases/robot.roboscale.io_robotartifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ spec:
DNS.
type: string
protocol:
default: TCP
enum:
- TCP
- UDP
type: string
reference:
description: Reference to the `Server` instance. It is used
Expand Down
4 changes: 3 additions & 1 deletion config/crd/bases/robot.roboscale.io_robots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ spec:
DNS.
type: string
protocol:
default: TCP
enum:
- TCP
- UDP
type: string
reference:
description: Reference to the `Server` instance. It is used
Expand Down
4 changes: 3 additions & 1 deletion config/crd/bases/robot.roboscale.io_ros2workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ spec:
Server's hostname. Used for getting Server's IP over DNS.
type: string
protocol:
default: TCP
enum:
- TCP
- UDP
type: string
reference:
description: Reference to the `Server` instance. It is used if
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: robolaunchio/robot-controller-manager
newTag: v0.2.7-alpha.6.1
newTag: v0.2.7-alpha.6.3
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand Down
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

![](https://raw.githubusercontent.com/robolaunch/trademark/main/logos/svg/rocket.svg)

# Robot Operator <small>0.2.7-alpha.6.1</small>
# Robot Operator <small>0.2.7-alpha.6.3</small>

robolaunch Kubernetes Robot Operator manages lifecycle of ROS 2 based robots and enables defining, deploying and distributing robots declaratively.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module github.com/robolaunch/robot-operator

go 1.21
go 1.21.1

require (
github.com/go-logr/logr v1.2.3
github.com/google/go-github v17.0.0+incompatible
github.com/onsi/ginkgo/v2 v2.6.0
github.com/onsi/gomega v1.24.1
github.com/robolaunch/cosmodrome v0.1.0-alpha.12
github.com/robolaunch/platform/server v0.0.0-20240313131851-88d97e7d270b
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
Expand Down Expand Up @@ -36,6 +37,7 @@ require (
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
Expand Down Expand Up @@ -256,6 +258,8 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/robolaunch/cosmodrome v0.1.0-alpha.12 h1:1ezr5n+7cB/YLv425rc6kkS0iU2ykU9TDNEPQcs8yeQ=
github.com/robolaunch/cosmodrome v0.1.0-alpha.12/go.mod h1:TMDMX9Eir84mHX74QqY+qV0E1NHAnXy67yvIPMvn8ko=
github.com/robolaunch/platform/server v0.0.0-20240313131851-88d97e7d270b h1:Juw9f0glukHPbPwnCsOJRwyRZbvfAQFC0SfyAgBYWHA=
github.com/robolaunch/platform/server v0.0.0-20240313131851-88d97e7d270b/go.mod h1:SN3BW8ejEhBHDMmfC1Q20mDltK4l0s88z3S9pVVarZk=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
Expand Down
4 changes: 2 additions & 2 deletions hack/deploy/chart/robot-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.7-alpha.6.1
version: 0.2.7-alpha.6.3
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.2.7-alpha.6.1"
appVersion: "v0.2.7-alpha.6.3"
Loading
Loading