Skip to content

Commit

Permalink
Update HelmRelease, HelmRepo resource layouts (#380)
Browse files Browse the repository at this point in the history
Signed-off-by: Rokibul Hasan <[email protected]>
  • Loading branch information
RokibulHasan7 authored Oct 29, 2023
1 parent 0b64fc1 commit f626e40
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 27 deletions.
3 changes: 2 additions & 1 deletion crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -106,6 +106,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down
6 changes: 4 additions & 2 deletions crds/meta.k8s.appscode.com_resourcedescriptors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
properties:
labels:
items:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -68,6 +68,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -205,7 +206,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -227,6 +228,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down
15 changes: 10 additions & 5 deletions crds/meta.k8s.appscode.com_resourcelayouts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -107,6 +107,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -322,7 +323,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -344,6 +345,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -585,7 +587,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -607,6 +609,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -821,7 +824,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -843,6 +846,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -1087,7 +1091,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -1109,6 +1113,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down
15 changes: 10 additions & 5 deletions crds/meta.k8s.appscode.com_resourceoutlines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -194,6 +194,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -411,7 +412,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -433,6 +434,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -676,7 +678,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -698,6 +700,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -914,7 +917,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -936,6 +939,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down Expand Up @@ -1182,7 +1186,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -1204,6 +1208,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down
3 changes: 2 additions & 1 deletion crds/ui.k8s.appscode.com_resourcedashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
query:
properties:
byLabel:
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,storage,view)
description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view)
enum:
- authn
- authz
Expand All @@ -73,6 +73,7 @@ spec:
- recommended_for
- restore_into
- scaled_by
- source
- storage
- view
type: string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
k8s.io/klog/v2 v2.80.1
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
kmodules.xyz/apiversion v0.2.0
kmodules.xyz/client-go v0.25.39
kmodules.xyz/client-go v0.25.40
kmodules.xyz/crd-schema-fuzz v0.25.0
kmodules.xyz/go-containerregistry v0.0.11
kmodules.xyz/resource-metrics v0.25.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,8 @@ k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJ
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
kmodules.xyz/client-go v0.25.39 h1:5n0fXviJXd/Sioo8v2/f+Ria026oxTjpF9wBte9sBh8=
kmodules.xyz/client-go v0.25.39/go.mod h1:ijkpW+0nkrKf8zpK7V/UQQzjWMZpnMX887jfYLHBMIM=
kmodules.xyz/client-go v0.25.40 h1:za/YLZRUFWHWfF/EYo3Hz9QFED5Mr/ptRumHb/bqxEI=
kmodules.xyz/client-go v0.25.40/go.mod h1:ijkpW+0nkrKf8zpK7V/UQQzjWMZpnMX887jfYLHBMIM=
kmodules.xyz/crd-schema-fuzz v0.25.0 h1:c5ZxNRqJak1bkGhECmyrKpzKGThFMB4088Kynyvngbc=
kmodules.xyz/crd-schema-fuzz v0.25.0/go.mod h1:VigFz19GwCxMGhb3YjCtlSXmfXb0J/g9du1So6rvqsk=
kmodules.xyz/go-containerregistry v0.0.11 h1:eZ7dz5QvszqoedOQLyqf5lkDa+S3Bds4EHHhb6jrLMc=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,32 @@ spec:
kind: Connection
name: HelmRepository
query:
byLabel: offshoot
raw: |-
query Find($src: String!, $targetGroup: String!, $targetKind: String!) {
find(oid: $src) {
offshoot(group: "source.toolkit.fluxcd.io", kind: "HelmChart") {
refs: source(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: source.toolkit.fluxcd.io
kind: HelmRepository
- actions:
create: Never
displayMode: List
kind: Connection
name: HelmChart
query:
byLabel: offshoot
type: GraphQL
ref:
group: source.toolkit.fluxcd.io
kind: HelmChart
resource:
group: helm.toolkit.fluxcd.io
kind: HelmRelease
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,22 @@ spec:
kind: Connection
name: HelmRepository
query:
byLabel: offshoot
byLabel: source
type: GraphQL
ref:
group: source.toolkit.fluxcd.io
kind: HelmRepository
- actions:
create: Never
displayMode: List
kind: Connection
name: HelmRelease
query:
byLabel: offshoot
type: GraphQL
ref:
group: helm.toolkit.fluxcd.io
kind: HelmRelease
resource:
group: source.toolkit.fluxcd.io
kind: HelmChart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
kind: Connection
name: HelmCharts
query:
byLabel: offshoot
byLabel: source
type: GraphQL
ref:
group: source.toolkit.fluxcd.io
Expand All @@ -22,7 +22,17 @@ spec:
kind: Connection
name: HelmReleases
query:
byLabel: offshoot
raw: |-
query Find($src: String!, $targetGroup: String!, $targetKind: String!) {
find(oid: $src) {
source(group: "source.toolkit.fluxcd.io", kind: "HelmChart") {
refs: offshoot(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: helm.toolkit.fluxcd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ spec:
- labels:
- offshoot
references:
- '{.spec.chart.spec.sourceRef.name}'
- '{.metadata.namespace}-{.spec.chart.spec.chart}'
target:
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
kind: HelmChart
type: MatchRef
resource:
group: helm.toolkit.fluxcd.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
spec:
connections:
- labels:
- offshoot
- source
references:
- '{.spec.sourceRef.name}'
target:
Expand Down
Loading

0 comments on commit f626e40

Please sign in to comment.