Skip to content

Commit

Permalink
prep next release
Browse files Browse the repository at this point in the history
* tweaks for service catalog
* ...
  • Loading branch information
michaeljguarino committed Dec 5, 2024
1 parent 52eceeb commit d0d4fd2
Show file tree
Hide file tree
Showing 24 changed files with 445 additions and 41 deletions.
14 changes: 7 additions & 7 deletions assets/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ function getMenuItems({
path: HOME_ABS_PATH,
hotkeys: ['shift H', '1'],
},
{
text: 'Service catalog',
expandedLabel: 'Service catalog',
icon: <CatalogIcon />,
path: CATALOGS_ABS_PATH,
hotkeys: ['2'],
},
{
text: 'Apps',
expandedLabel: 'Apps',
Expand Down Expand Up @@ -139,6 +132,13 @@ function getMenuItems({
path: `${AI_ABS_PATH}`,
hotkeys: ['shift A', '6'],
},
{
text: 'Service catalog',
expandedLabel: 'Service catalog',
icon: <CatalogIcon />,
path: CATALOGS_ABS_PATH,
hotkeys: ['2'],
},
{
text: 'Builds',
expandedLabel: 'Builds',
Expand Down
2 changes: 1 addition & 1 deletion assets/src/generated/graphql-kubernetes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable */
/* prettier-ignore */
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
Expand Down
2 changes: 1 addition & 1 deletion assets/src/generated/graphql-plural.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable */
/* prettier-ignore */
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
Expand Down
30 changes: 29 additions & 1 deletion assets/src/generated/graphql.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable */
/* prettier-ignore */
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
Expand Down Expand Up @@ -261,6 +261,8 @@ export type AiSettings = {
ollama?: Maybe<OllamaSettings>;
openai?: Maybe<OpenaiSettings>;
provider?: Maybe<AiProvider>;
/** ai provider to use with tool calls */
toolProvider?: Maybe<AiProvider>;
toolsEnabled?: Maybe<Scalars['Boolean']['output']>;
vertex?: Maybe<VertexAiSettings>;
};
Expand All @@ -273,6 +275,8 @@ export type AiSettingsAttributes = {
ollama?: InputMaybe<OllamaAttributes>;
openai?: InputMaybe<OpenaiSettingsAttributes>;
provider?: InputMaybe<AiProvider>;
/** ai provider to use with tool calls */
toolProvider?: InputMaybe<AiProvider>;
tools?: InputMaybe<ToolConfigAttributes>;
vertex?: InputMaybe<VertexAiAttributes>;
};
Expand Down Expand Up @@ -6684,6 +6688,7 @@ export type RootQueryType = {
violationStatistics?: Maybe<Array<Maybe<ViolationStatistic>>>;
vulnerabilityReport?: Maybe<VulnerabilityReport>;
vulnerabilityReports?: Maybe<VulnerabilityReportConnection>;
vulnerabilityStatistics?: Maybe<Array<Maybe<VulnerabilityStatistic>>>;
webhooks?: Maybe<WebhookConnection>;
wireguardPeer?: Maybe<WireguardPeer>;
wireguardPeers?: Maybe<Array<Maybe<WireguardPeer>>>;
Expand Down Expand Up @@ -7731,7 +7736,16 @@ export type RootQueryTypeVulnerabilityReportsArgs = {
before?: InputMaybe<Scalars['String']['input']>;
clusters?: InputMaybe<Array<InputMaybe<Scalars['ID']['input']>>>;
first?: InputMaybe<Scalars['Int']['input']>;
grade?: InputMaybe<VulnReportGrade>;
last?: InputMaybe<Scalars['Int']['input']>;
namespaces?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
q?: InputMaybe<Scalars['String']['input']>;
};


export type RootQueryTypeVulnerabilityStatisticsArgs = {
clusters?: InputMaybe<Array<InputMaybe<Scalars['ID']['input']>>>;
namespaces?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
q?: InputMaybe<Scalars['String']['input']>;
};

Expand Down Expand Up @@ -9489,6 +9503,14 @@ export type VulnOsAttributes = {
name?: InputMaybe<Scalars['String']['input']>;
};

export enum VulnReportGrade {
A = 'A',
B = 'B',
C = 'C',
D = 'D',
F = 'F'
}

export enum VulnSeverity {
Critical = 'CRITICAL',
High = 'HIGH',
Expand Down Expand Up @@ -9596,6 +9618,12 @@ export type VulnerabilityReportEdge = {
node?: Maybe<VulnerabilityReport>;
};

export type VulnerabilityStatistic = {
__typename?: 'VulnerabilityStatistic';
count: Scalars['Int']['output'];
grade: VulnReportGrade;
};

export type WaitingState = {
__typename?: 'WaitingState';
message?: Maybe<Scalars['String']['output']>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,18 @@ spec:
- BEDROCK
- VERTEX
type: string
toolProvider:
default: OPENAI
description: Provider to use for tool calling, in case you want
to use a different LLM more optimized to those tasks
enum:
- OPENAI
- ANTHROPIC
- OLLAMA
- AZURE
- BEDROCK
- VERTEX
type: string
vertex:
description: Vertex holds configuration for using GCP VertexAI
to generate LLM insights
Expand Down
43 changes: 43 additions & 0 deletions charts/controller/crds/deployments.plural.sh_prautomations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,49 @@ spec:
description: The base branch this pr will be based on (defaults to
the repo's main branch)
type: string
catalogRef:
description: CatalogRef the catalog this automation will belong to
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.
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
clusterRef:
description: ClusterRef a cluster this pr works on
properties:
Expand Down
80 changes: 68 additions & 12 deletions go/client/models_gen.go

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

14 changes: 14 additions & 0 deletions go/controller/api/v1alpha1/catalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,17 @@ func (c *Catalog) Diff(hasher Hasher) (changed bool, sha string, err error) {

return !c.Status.IsSHAEqual(currentSha), currentSha, nil
}

// ConsoleID implements [PluralResource] interface
func (in *Catalog) ConsoleID() *string {
return in.Status.ID
}

// ConsoleName implements [PluralResource] interface
func (in *Catalog) ConsoleName() string {
if in.Spec.Name != nil {
return *in.Spec.Name
}

return in.Name
}
12 changes: 10 additions & 2 deletions go/controller/api/v1alpha1/deploymentsettings_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ type AISettings struct {
// +kubebuilder:validation:Optional
Provider *console.AiProvider `json:"provider,omitempty"`

// Provider to use for tool calling, in case you want to use a different LLM more optimized to those tasks
//
// +kubebuilder:validation:Enum=OPENAI;ANTHROPIC;OLLAMA;AZURE;BEDROCK;VERTEX
// +kubebuilder:default=OPENAI
// +kubebuilder:validation:Optional
ToolProvider *console.AiProvider `json:"toolProvider,omitempty"`

// OpenAI holds the OpenAI provider configuration.
//
// +kubebuilder:validation:Optional
Expand Down Expand Up @@ -216,8 +223,9 @@ type AISettings struct {

func (in *AISettings) Attributes(ctx context.Context, c client.Client, namespace string) (*console.AiSettingsAttributes, error) {
attr := &console.AiSettingsAttributes{
Enabled: in.Enabled,
Provider: in.Provider,
Enabled: in.Enabled,
Provider: in.Provider,
ToolProvider: in.ToolProvider,
}

switch *in.Provider {
Expand Down
4 changes: 4 additions & 0 deletions go/controller/api/v1alpha1/prautomation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ type PrAutomationSpec struct {
// +kubebuilder:validation:Optional
ProjectRef *corev1.ObjectReference `json:"projectRef,omitempty"`

// CatalogRef the catalog this automation will belong to
// +kubebuilder:validation:Optional
CatalogRef *corev1.ObjectReference `json:"catalogRef,omitempty"`

// Bindings contain read and write policies of pr automation
// +kubebuilder:validation:Optional
Bindings *PrAutomationBindings `json:"bindings,omitempty"`
Expand Down
10 changes: 10 additions & 0 deletions go/controller/api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,18 @@ spec:
- BEDROCK
- VERTEX
type: string
toolProvider:
default: OPENAI
description: Provider to use for tool calling, in case you want
to use a different LLM more optimized to those tasks
enum:
- OPENAI
- ANTHROPIC
- OLLAMA
- AZURE
- BEDROCK
- VERTEX
type: string
vertex:
description: Vertex holds configuration for using GCP VertexAI
to generate LLM insights
Expand Down
Loading

0 comments on commit d0d4fd2

Please sign in to comment.