Skip to content

Commit

Permalink
Add cluster/project pr automation config types (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Jan 17, 2025
1 parent 297016e commit bd99b4f
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 4 deletions.
2 changes: 2 additions & 0 deletions assets/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1834,12 +1834,14 @@ export type ConfigMap = {
export enum ConfigurationType {
Bool = 'BOOL',
Bucket = 'BUCKET',
Cluster = 'CLUSTER',
Domain = 'DOMAIN',
Enum = 'ENUM',
File = 'FILE',
Function = 'FUNCTION',
Int = 'INT',
Password = 'PASSWORD',
Project = 'PROJECT',
String = 'STRING'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ spec:
- FUNCTION
- PASSWORD
- ENUM
- CLUSTER
- PROJECT
type: string
validation:
description: Any additional validations you want to apply to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ spec:
- FUNCTION
- PASSWORD
- ENUM
- CLUSTER
- PROJECT
type: string
validation:
description: Any additional validations you want to apply to
Expand Down
6 changes: 5 additions & 1 deletion go/client/models_gen.go

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

2 changes: 1 addition & 1 deletion go/controller/api/v1alpha1/prautomation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ type PrAutomationConfiguration struct {
Name string `json:"name"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum=STRING;INT;BOOL;DOMAIN;BUCKET;FILE;FUNCTION;PASSWORD;ENUM
// +kubebuilder:validation:Enum=STRING;INT;BOOL;DOMAIN;BUCKET;FILE;FUNCTION;PASSWORD;ENUM;CLUSTER;PROJECT
Type console.ConfigurationType `json:"type"`

// +kubebuilder:validation:Optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ spec:
- FUNCTION
- PASSWORD
- ENUM
- CLUSTER
- PROJECT
type: string
validation:
description: Any additional validations you want to apply to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ spec:
- FUNCTION
- PASSWORD
- ENUM
- CLUSTER
- PROJECT
type: string
validation:
description: Any additional validations you want to apply to
Expand Down
2 changes: 1 addition & 1 deletion go/controller/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,7 @@ _Appears in:_
| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `name` _string_ | | | Required: {} <br /> |
| `type` _[ConfigurationType](#configurationtype)_ | | | Enum: [STRING INT BOOL DOMAIN BUCKET FILE FUNCTION PASSWORD ENUM] <br />Required: {} <br /> |
| `type` _[ConfigurationType](#configurationtype)_ | | | Enum: [STRING INT BOOL DOMAIN BUCKET FILE FUNCTION PASSWORD ENUM CLUSTER PROJECT] <br />Required: {} <br /> |
| `condition` _[Condition](#condition)_ | | | Optional: {} <br /> |
| `default` _string_ | | | Optional: {} <br /> |
| `documentation` _string_ | | | Optional: {} <br /> |
Expand Down
4 changes: 3 additions & 1 deletion lib/console/schema/embeds.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ defmodule Console.Schema.Configuration do
file: 5,
function: 6,
password: 7,
enum: 8
enum: 8,
cluster: 9,
project: 10

defenum UniqScope, project: 0, cluster: 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ spec:
- FUNCTION
- PASSWORD
- ENUM
- CLUSTER
- PROJECT
type: string
validation:
description: Any additional validations you want to apply to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ spec:
- FUNCTION
- PASSWORD
- ENUM
- CLUSTER
- PROJECT
type: string
validation:
description: Any additional validations you want to apply to
Expand Down
2 changes: 2 additions & 0 deletions schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5602,6 +5602,8 @@ enum ConfigurationType {
FUNCTION
PASSWORD
ENUM
CLUSTER
PROJECT
}

enum Operation {
Expand Down

0 comments on commit bd99b4f

Please sign in to comment.