Skip to content

Conversation

@eguzki
Copy link
Member

@eguzki eguzki commented Mar 8, 2022

what

The Tenant CRD has three fields of SecretReference type. If the Namespace is not set in the custom resource, the tenant controller should default that value to the custom resource's namespace.

verification steps

Deploy 3scale with APIManager CR

apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
  name: apimanager1
spec:
  wildcardDomain: example.com
  resourceRequirementsEnabled: false
  system:
    fileStorage:
      simpleStorageService:
        configurationSecretRef:
          name: aws-auth

Then create one tenant with secret references without namespace

apiVersion: capabilities.3scale.net/v1alpha1
kind: Tenant
metadata:
  name: ecorp-tenant
spec:
  username: admin
  systemMasterUrl: https://master.example.com
  email: admin@example.com
  organizationName: ECorp
  masterCredentialsRef:
    name: system-seed
  passwordCredentialsRef:
    name: ecorp-admin-secret
  tenantSecretRef:
    name: ecorp-tenant-secret

Without the fix, the controller would fail and tenant CR status would not have IDs from 3scale

If it works, the tenant status should look like this:

k get tenants  ecorp-tenant -o jsonpath='{.status}' | yq e -P
adminId: 5
tenantId: 4

@eguzki eguzki requested review from KevFan and MStokluska March 8, 2022 09:14
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit acb766e and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 3

View more on Code Climate.

@MStokluska
Copy link
Contributor

code changes look good - going to verify it on a cluster

@MStokluska
Copy link
Contributor

Verified on cluster, looks good to me
/lgtm

@eguzki eguzki merged commit d9ab3a1 into master Mar 11, 2022
@eguzki eguzki deleted the fix-tenant-secret-ref branch March 11, 2022 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants