-
Notifications
You must be signed in to change notification settings - Fork 14
Implement routing configuration for Backstage server endpoint #53
Conversation
aedcc10
to
b3a6c78
Compare
b3a6c78
to
a2401ca
Compare
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 | |||
kind: CustomResourceDefinition | |||
metadata: | |||
annotations: | |||
controller-gen.kubebuilder.io/version: v0.11.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it is downgraded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected
@@ -187,7 +187,7 @@ var _ = Describe("Backstage controller", func() { | |||
found := &appsv1.Deployment{} | |||
Eventually(func() error { | |||
// TODO to get name from default | |||
return k8sClient.Get(ctx, types.NamespacedName{Namespace: ns, Name: "backstage"}, found) | |||
return k8sClient.Get(ctx, types.NamespacedName{Namespace: ns, Name: "backstage-" + backstageName}, found) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use Sprintf as we usually do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good :)
33cb07a
to
383c941
Compare
1781469
to
b0d0381
Compare
b0d0381
to
b5306c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, can you rebase your branch to resolve the conflicts reported?
@@ -129,6 +125,14 @@ func (r *BackstageReconciler) addBackendAuthEnvVar(ctx context.Context, backstag | |||
Name: "APP_CONFIG_backend_auth_keys", | |||
Value: `[{"secret": "$(BACKEND_SECRET)"}]`, | |||
}) | |||
// If a local PostGres DB is used, set POSTGRES_HOST env variable to the local PostGres DB service. | |||
if !backstage.Spec.SkipLocalDb { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is more about handling the Backstage Backend Auth Key, not setting info about the local DB.
For better separation of concerns (and also to avoid Git conflicts since this file has changed a bit in #56 - see https://github.com/janus-idp/operator/pull/56/files#diff-d608a9323a5923cb475353e2f8d44c7571b93e49a4fd40f69ab7d1fcbef1801a), I'd suggest adding this env var elsewhere.. Maybe in BackstageReconciler.addEnvVars
in backstage_controller.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Moved to BackstageReconciler.addEnvVars.
Close and resubmit as another PR. |
Deploy an OpenShift route on OpenShift clusters.
Description
Changes made:
Note #1: supporting host and tls in the route via Backstage CR is not in the scope of this PR. Such work shall be done later as a separate PR after the data model has been finalized.
Note #2: unit test with isOpenShift=true is not included as OpenShift specific objects (routes, projects etc) are not currently supported by the envTest tool (see operator-framework/operator-sdk#4434).
Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer
Deploy the operator and backstage sample CR on an OpnenShift cluster and check if the OpenShift route for Backstage has been created.