Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add descriptions and samples to CSV #372

Merged
merged 1 commit into from
Dec 13, 2023
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
88 changes: 82 additions & 6 deletions bundle/manifests/kuadrant-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,68 @@ metadata:
annotations:
alm-examples: |-
[
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these might need to be added in the MGC repo? I think this will get nuked when we do a new bundle as it is pulled in from MGC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, here I just added the sample files manually to the kuadrant-operator/config/samples/kustomization.yaml from where they propagate to the examples in CSV.

Fetching these samples automatically from the MGC repo would make more sense I guess. I need to check how to do that in Kustomize. If not possible than I think the samples would need to be fetched in the make bundle script.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see. Yeah I mean I guess this is ok, but would be better to have them from the source

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. Ok, did some experimentation and looks like we could put a kustomization.yaml to have a remote base with the samples in the MGC repo. The samples for TLSPolicy, ManagedZone and DNSPolicy are already there.
And since the DNSHealthCheckProbe and DNSRecord are created by the controller I suppose there is no real need to expose examples for these two in the Operator Hub through the CSV?

The snipped below would go to: multicluster-gateway-controller/config/samples/kustomization.yaml:

resources:
- kuadrant.io_v1alpha1_tlspolicy.yaml
- kuadrant.io_v1alpha1_managedzone.yaml
- dnspolicy.yaml

Then we could have a reference to it as a remote resource for kustomize in kuadrant-operator:

resources:
- github.com/Kuadrant/multicluster-gateway-controller/config/samples?ref=main

This would let us keep the samples in one place and not worry about updating them manually in kuadrant-operator.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds like a good option. If you open the PR I will take a look at it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR opened. I'll leave the link here as a cross reference: Add config/samples/kustomization.yaml #720

"apiVersion": "kuadrant.io/v1alpha1",
"kind": "DNSPolicy",
"metadata": {
"name": "example-dnspolicy"
},
"spec": {
"healthCheck": {
"endpoint": "/",
"protocol": "HTTP"
},
"targetRef": {
"group": "",
"kind": "Gateway",
"name": "example-gateway"
}
}
},
{
"apiVersion": "kuadrant.io/v1alpha1",
"kind": "ManagedZone",
"metadata": {
"labels": {
"app.kubernetes.io/created-by": "multicluster-gateway-controller",
"app.kubernetes.io/instance": "managedzone-sample",
"app.kubernetes.io/managed-by": "kustomize",
"app.kubernetes.io/name": "managedzone",
"app.kubernetes.io/part-of": "multicluster-gateway-controller"
},
"name": "managedzone-sample"
},
"spec": {
"description": "My managed domain",
"domainName": "testmz.hcapps.net"
}
},
{
"apiVersion": "kuadrant.io/v1alpha1",
"kind": "TLSPolicy",
"metadata": {
"labels": {
"app.kubernetes.io/created-by": "tmp",
"app.kubernetes.io/instance": "tlspolicy-sample",
"app.kubernetes.io/managed-by": "kustomize",
"app.kubernetes.io/name": "tlspolicy",
"app.kubernetes.io/part-of": "tmp"
},
"name": "tlspolicy-sample"
},
"spec": {
"issuerRef": {
"group": "cert-manager.io",
"kind": "ClusterIssuer",
"name": "glbc-ca"
},
"targetRef": {
"group": "gateway.networking.k8s.io",
"kind": "Gateway",
"name": "prod-web"
}
}
},
{
"apiVersion": "kuadrant.io/v1beta1",
"kind": "Kuadrant",
Expand Down Expand Up @@ -69,7 +131,7 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/kuadrant/kuadrant-operator:latest
createdAt: "2023-12-08T14:10:07Z"
createdAt: "2023-12-12T12:34:15Z"
operators.operatorframework.io/builder: operator-sdk-v1.32.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/Kuadrant/kuadrant-operator
Expand All @@ -86,13 +148,21 @@ spec:
kind: AuthPolicy
name: authpolicies.kuadrant.io
version: v1beta2
- kind: DNSHealthCheckProbe
- description: DNSHealthCheckProbe enables performing health checks against a
DNS endpoint (A or CNAME record)
displayName: DNSHealthCheckProbe
kind: DNSHealthCheckProbe
name: dnshealthcheckprobes.kuadrant.io
version: v1alpha1
- kind: DNSPolicy
- description: DNSPolicy configures how North-South based traffic should be balanced
and reach the gateways
displayName: DNSPolicy
kind: DNSPolicy
name: dnspolicies.kuadrant.io
version: v1alpha1
- kind: DNSRecord
- description: DNSRecord represents DNS endpoints for gateway network services
displayName: DNSRecord
kind: DNSRecord
name: dnsrecords.kuadrant.io
version: v1alpha1
- description: Kuadrant configures installations of Kuadrant Service Protection
Expand All @@ -101,7 +171,10 @@ spec:
kind: Kuadrant
name: kuadrants.kuadrant.io
version: v1beta1
- kind: ManagedZone
- description: ManagedZone configures domain or subdomain management for gateway
hosts
displayName: ManagedZone
kind: ManagedZone
name: managedzones.kuadrant.io
version: v1alpha1
- description: RateLimitPolicy enables rate limiting for service workloads in
Expand All @@ -110,7 +183,10 @@ spec:
kind: RateLimitPolicy
name: ratelimitpolicies.kuadrant.io
version: v1beta2
- kind: TLSPolicy
- description: TLSPolicy provides tls for gateway listeners by managing the lifecycle
of tls certificates
displayName: TLSPolicy
kind: TLSPolicy
name: tlspolicies.kuadrant.io
version: v1alpha1
description: A Kubernetes Operator to manage the lifecycle of the Kuadrant system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,31 @@ spec:
kind: RateLimitPolicy
name: ratelimitpolicies.kuadrant.io
version: v1beta2
- description: DNSHealthCheckProbe enables performing health checks against a DNS endpoint (A or CNAME record)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with these

displayName: DNSHealthCheckProbe
kind: DNSHealthCheckProbe
name: dnshealthcheckprobes.kuadrant.io
version: v1alpha1
- description: DNSPolicy configures how North-South based traffic should be balanced and reach the gateways
displayName: DNSPolicy
kind: DNSPolicy
name: dnspolicies.kuadrant.io
version: v1alpha1
- description: DNSRecord represents DNS endpoints for gateway network services
displayName: DNSRecord
kind: DNSRecord
name: dnsrecords.kuadrant.io
version: v1alpha1
- description: ManagedZone configures domain or subdomain management for gateway hosts
displayName: ManagedZone
kind: ManagedZone
name: managedzones.kuadrant.io
version: v1alpha1
- description: TLSPolicy provides tls for gateway listeners by managing the lifecycle of tls certificates
displayName: TLSPolicy
kind: TLSPolicy
name: tlspolicies.kuadrant.io
version: v1alpha1
description: A Kubernetes Operator to manage the lifecycle of the Kuadrant system
displayName: Kuadrant Operator
icon:
Expand Down
1 change: 1 addition & 0 deletions config/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ resources:
- bases/kuadrant-operator.clusterserviceversion.yaml
- ../default
- ../samples
- github.com/Kuadrant/multicluster-gateway-controller/config/samples
- ../scorecard

# [WEBHOOK] To enable webhooks, uncomment all the sections with [WEBHOOK] prefix.
Expand Down
Loading