Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions cmd/rig-proto-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var (
}
compiledTypes = []any{
v1.CapsuleStar{},
v1.CapsuleEnvironment{},
v1.Environment{},
v1.Project{},
}
Expand Down
38 changes: 21 additions & 17 deletions docs/docs/api/platform-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7834,6 +7834,26 @@ Empty response for updating users settings for the Rig project.



<a name="platform-v1-CapsuleEnvironment"></a>

### CapsuleEnvironment



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| kind | [string](#string) | | |
| apiVersion | [string](#string) | | |
| name | [string](#string) | | |
| project | [string](#string) | | |
| environment | [string](#string) | | |
| spec | [CapsuleSpecExtension](#platform-v1-CapsuleSpecExtension) | | |






<a name="platform-v1-CapsuleSpecExtension"></a>

### CapsuleSpecExtension
Expand Down Expand Up @@ -7904,23 +7924,7 @@ Empty response for updating users settings for the Rig project.
| name | [string](#string) | | |
| project | [string](#string) | | |
| capsuleBase | [CapsuleSpecExtension](#platform-v1-CapsuleSpecExtension) | | |
| environments | [CapsuleStar.EnvironmentsEntry](#platform-v1-CapsuleStar-EnvironmentsEntry) | repeated | |






<a name="platform-v1-CapsuleStar-EnvironmentsEntry"></a>

### CapsuleStar.EnvironmentsEntry



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [CapsuleSpecExtension](#platform-v1-CapsuleSpecExtension) | | |
| environments | [string](#string) | repeated | |



Expand Down
26 changes: 22 additions & 4 deletions pkg/api/platform/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,30 @@ type CapsuleStar struct {
metav1.TypeMeta `json:",inline"`
// Name,Project is unique
Name string `json:"name" protobuf:"3"`
// Project references an existing Project2 type with the given name
// Will throw an error (in the platform) if the project does not exist
// Project references an existing Project type with the given name
// Will throw an error (in the platform) if the Project does not exist
Project string `json:"project" protobuf:"4"`
// Capsule-level defaults
CapsuleBase CapsuleSpecExtension `json:"capsuleBase" protobuf:"5"`
Environments map[string]CapsuleSpecExtension `json:"environments" protobuf:"6"`
CapsuleBase CapsuleSpecExtension `json:"capsuleBase" protobuf:"5"`
Environments []string `json:"environments" protobuf:"6"`
}

// +kubebuilder:object:root=true

type CapsuleEnvironment struct {
metav1.TypeMeta `json:",inline"`
// Name,Project,Environment is unique
// Project,Name referes to an existing CapsuleStar type with the given name and project
// Will throw an error (in the platform) if the CapsuleStar does not exist
Name string `json:"name" protobuf:"3"`
// Project references an existing Project type with the given name
// Will throw an error (in the platform) if the Project does not exist
Project string `json:"project" protobuf:"4"`
// Environment references an existing Environment type with the given name
// Will throw an error (in the platform) if the Environment does not exist
// The environment also needs to be present in the parent CapsuleStar
Environment string `json:"environment" protobuf:"5"`
Spec CapsuleSpecExtension `json:"spec" protobuf:"6"`
}

type CapsuleSpecExtension struct {
Expand Down
31 changes: 27 additions & 4 deletions pkg/api/platform/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion proto/rig/platform/v1/generated.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ message CapsuleStar {
string name = 3;
string project = 4;
CapsuleSpecExtension capsuleBase = 5;
map<string, CapsuleSpecExtension> environments = 6;
repeated string environments = 6;
}

message CapsuleSpecExtension {
Expand All @@ -33,6 +33,15 @@ message ConfigFile {
bool isSecret = 3;
}

message CapsuleEnvironment {
string kind = 1;
string apiVersion = 2;
string name = 3;
string project = 4;
string environment = 5;
CapsuleSpecExtension spec = 6;
}

message Environment {
string kind = 1;
string apiVersion = 2;
Expand Down