Skip to content

Commit

Permalink
Implement helm.repositoryRef in controller (#918)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed May 6, 2024
1 parent d0b0b92 commit 017442d
Show file tree
Hide file tree
Showing 39 changed files with 795 additions and 32 deletions.
36 changes: 36 additions & 0 deletions assets/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3595,6 +3595,17 @@ export type PullRequestEdge = {
node?: Maybe<PullRequest>;
};

/** attributes for a pull request pointer record */
export type PullRequestUpdateAttributes = {
cluster?: InputMaybe<NamespacedName>;
clusterId?: InputMaybe<Scalars['ID']['input']>;
labels?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
service?: InputMaybe<NamespacedName>;
serviceId?: InputMaybe<Scalars['ID']['input']>;
status: PrStatus;
title: Scalars['String']['input'];
};

export type RbacAttributes = {
readBindings?: InputMaybe<Array<InputMaybe<PolicyBindingAttributes>>>;
writeBindings?: InputMaybe<Array<InputMaybe<PolicyBindingAttributes>>>;
Expand Down Expand Up @@ -3931,6 +3942,7 @@ export type RootMutationType = {
deletePod?: Maybe<Pod>;
deletePrAutomation?: Maybe<PrAutomation>;
deleteProviderCredential?: Maybe<ProviderCredential>;
deletePullRequest?: Maybe<PullRequest>;
deleteRole?: Maybe<Role>;
deleteScmConnection?: Maybe<ScmConnection>;
deleteServiceContext?: Maybe<ServiceContext>;
Expand Down Expand Up @@ -3995,6 +4007,7 @@ export type RootMutationType = {
updateObjectStore?: Maybe<ObjectStore>;
updatePersona?: Maybe<Persona>;
updatePrAutomation?: Maybe<PrAutomation>;
updatePullRequest?: Maybe<PullRequest>;
/** a reusable mutation for updating rbac settings on core services */
updateRbac?: Maybe<Scalars['Boolean']['output']>;
updateRole?: Maybe<Role>;
Expand Down Expand Up @@ -4352,6 +4365,11 @@ export type RootMutationTypeDeleteProviderCredentialArgs = {
};


export type RootMutationTypeDeletePullRequestArgs = {
id: Scalars['ID']['input'];
};


export type RootMutationTypeDeleteRoleArgs = {
id: Scalars['ID']['input'];
};
Expand Down Expand Up @@ -4650,6 +4668,12 @@ export type RootMutationTypeUpdatePrAutomationArgs = {
};


export type RootMutationTypeUpdatePullRequestArgs = {
attributes?: InputMaybe<PullRequestUpdateAttributes>;
id: Scalars['ID']['input'];
};


export type RootMutationTypeUpdateRbacArgs = {
clusterId?: InputMaybe<Scalars['ID']['input']>;
providerId?: InputMaybe<Scalars['ID']['input']>;
Expand Down Expand Up @@ -5753,6 +5777,7 @@ export type RootSubscriptionType = {
commandDelta?: Maybe<CommandDelta>;
notificationDelta?: Maybe<NotificationDelta>;
podDelta?: Maybe<PodDelta>;
runLogsDelta?: Maybe<RunLogsDelta>;
};


Expand All @@ -5765,6 +5790,11 @@ export type RootSubscriptionTypeCommandDeltaArgs = {
buildId: Scalars['ID']['input'];
};


export type RootSubscriptionTypeRunLogsDeltaArgs = {
stepId: Scalars['ID']['input'];
};

export type RouterFilterAttributes = {
/** whether to enable delivery for events associated with this cluster */
clusterId?: InputMaybe<Scalars['ID']['input']>;
Expand Down Expand Up @@ -5792,6 +5822,12 @@ export type RunLogs = {
updatedAt?: Maybe<Scalars['DateTime']['output']>;
};

export type RunLogsDelta = {
__typename?: 'RunLogsDelta';
delta?: Maybe<Delta>;
payload?: Maybe<RunLogs>;
};

export type RunStep = {
__typename?: 'RunStep';
args?: Maybe<Array<Scalars['String']['output']>>;
Expand Down
46 changes: 46 additions & 0 deletions charts/controller/crds/deployments.plural.sh_globalservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,52 @@ spec:
- name
- namespace
type: object
repositoryRef:
description: reference to a GitRepository to source the helm
chart from (useful if you're using a multi-source configuration
for values files)
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
values:
description: arbitrary yaml values to overlay
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,52 @@ spec:
- name
- namespace
type: object
repositoryRef:
description: reference to a GitRepository to source the helm
chart from (useful if you're using a multi-source configuration
for values files)
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
values:
description: arbitrary yaml values to overlay
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,52 @@ spec:
- name
- namespace
type: object
repositoryRef:
description: reference to a GitRepository to source the helm chart
from (useful if you're using a multi-source configuration for
values files)
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
values:
description: arbitrary yaml values to overlay
type: object
Expand Down
3 changes: 3 additions & 0 deletions controller/api/v1alpha1/servicedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ type ServiceHelm struct {
// name of the helm release to use when applying
// +kubebuilder:validation:Optional
Release *string `json:"release,omitempty"`
// reference to a GitRepository to source the helm chart from (useful if you're using a multi-source configuration for values files)
// +kubebuilder:validation:Optional
RepositoryRef *corev1.ObjectReference `json:"repositoryRef"`
// arbitrary yaml values to overlay
// +kubebuilder:validation:Optional
Values *runtime.RawExtension `json:"values,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions 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 @@ -278,6 +278,52 @@ spec:
- name
- namespace
type: object
repositoryRef:
description: reference to a GitRepository to source the helm
chart from (useful if you're using a multi-source configuration
for values files)
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
values:
description: arbitrary yaml values to overlay
type: object
Expand Down
Loading

0 comments on commit 017442d

Please sign in to comment.