Skip to content

Commit

Permalink
Revert "Remove RobotType from Registry API"
Browse files Browse the repository at this point in the history
This reverts commit 069b80187c808b35b370afb450b9374b0765c95b.

Reason for revert: SAP/ewm-cloud-robotics#37

Change-Id: I2e29df5d43be8423bf28d7abb17583312456f683
GitOrigin-RevId: d27f4070dc4ee7ebda7bae5a649133e5f8616d2c
  • Loading branch information
drigz authored and copybara-github committed Mar 14, 2022
1 parent e27a03a commit 89163a2
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
1 change: 0 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ function cleanup_old_cert_manager {
function helm_cleanup {
cleanup_helm_data
cleanup_old_cert_manager
kc delete crd robottypes.registry.cloudrobotics.com 2> /dev/null || true
}

function helm_charts {
Expand Down
3 changes: 2 additions & 1 deletion src/app_charts/base/cloud/cr-syncer-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ rules:

# To sync the specs from the cloud to the robot, the cr-syncer needs to read
# the resources in the cloud cluster. Note that the Robot and ChartAssignment
# CRDs enable the /status subresource.
# CRDs enable the /status subresource, whereas the RobotType does not.
- apiGroups:
- registry.cloudrobotics.com
resources:
- robots
- robots/status
- robottypes
verbs:
- get
- list
Expand Down
32 changes: 32 additions & 0 deletions src/app_charts/base/cloud/registry-crd.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: robottypes.registry.cloudrobotics.com
annotations:
cr-syncer.cloudrobotics.com/spec-source: cloud
helm.sh/resource-policy: keep
spec:
group: registry.cloudrobotics.com
names:
kind: RobotType
plural: robottypes
singular: robottype
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
required: ['make', 'model']
maxProperties: 2
properties:
make:
type: string
model:
type: string
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: robots.registry.cloudrobotics.com
annotations:
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/robot/setup_robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ kc -n kube-system delete sa tiller 2> /dev/null || true
kc -n kube-system delete cm -l OWNER=TILLER 2> /dev/null
# Cleanup old resources
kc -n default delete secret robot-master-tls 2> /dev/null || true
kc delete crd robottypes.registry.cloudrobotics.com 2> /dev/null || true

# Remove previous instance, in case installation was canceled
kc delete pod setup-robot 2> /dev/null || true
Expand Down
20 changes: 20 additions & 0 deletions src/proto/registry/registry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
};
};

/* Information about the robot model.
*
* RobotType contains shared information about a specific robot model.
*/
message RobotTypeSpec {
// Manufacturer name of the robot.
// Output only
string make = 1;

// Model name of the robot.
// Output only
string model = 2;

// TODO(ensonic): consider more details, such as icons, urdf, ...
}

message RobotTypeStatus {
// Types aren't actuated.
}

message RobotSpec {
string type = 1;
string project = 3;
Expand Down

0 comments on commit 89163a2

Please sign in to comment.