Do not pass empty Arrays #124

Closed
opened 2025-06-26 14:50:03 +00:00 by tobru · 2 comments
Owner

Description

Creating an instance through the portal passes empty arrays, that shouldn't happen. Example:

❯ k -n acme get vshnredis test -o yaml
apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNRedis
metadata:
  creationTimestamp: "2025-06-26T14:28:38Z"
  finalizers:
  - finalizer.apiextensions.crossplane.io
  generation: 3
  labels:
    appcat.vshn.io/provider-config: servala-exo-prod1
  name: test
  namespace: acme
  resourceVersion: "12075687"
  uid: d87e48e7-8214-4aa3-acb8-b9117eeb3489
spec:
  compositeDeletePolicy: Background
  compositionRef:
    name: vshnredis.vshn.appcat.vshn.io
  compositionRevisionRef:
    name: vshnredis.vshn.appcat.vshn.io-99cf091
  parameters:
    backup:
      retention:
        keepDaily: 6
    monitoring:
      alertmanagerConfigTemplate:
        inhibitRules: []
        muteTimeIntervals: []
        receivers: []
        route:
          activeTimeIntervals: []
          groupBy: []
          matchers: []
          muteTimeIntervals: []
          routes: []
    security:
      allowAllNamespaces: false
      allowedGroups: []
      allowedNamespaces: []
      allowedUsers: []
      deletionProtection: true
    service:
      serviceLevel: besteffort
      version: "7.2"
    size:
      plan: standard-1
    tls:
      authClients: true
      enabled: true
  resourceRef:
    apiVersion: vshn.appcat.vshn.io/v1
    kind: XVSHNRedis
    name: test-dkwj9
  writeConnectionSecretToRef:
    name: acme-corp-1-30-redis

## Description Creating an instance through the portal passes empty arrays, that shouldn't happen. Example: ``` ❯ k -n acme get vshnredis test -o yaml apiVersion: vshn.appcat.vshn.io/v1 kind: VSHNRedis metadata: creationTimestamp: "2025-06-26T14:28:38Z" finalizers: - finalizer.apiextensions.crossplane.io generation: 3 labels: appcat.vshn.io/provider-config: servala-exo-prod1 name: test namespace: acme resourceVersion: "12075687" uid: d87e48e7-8214-4aa3-acb8-b9117eeb3489 spec: compositeDeletePolicy: Background compositionRef: name: vshnredis.vshn.appcat.vshn.io compositionRevisionRef: name: vshnredis.vshn.appcat.vshn.io-99cf091 parameters: backup: retention: keepDaily: 6 monitoring: alertmanagerConfigTemplate: inhibitRules: [] muteTimeIntervals: [] receivers: [] route: activeTimeIntervals: [] groupBy: [] matchers: [] muteTimeIntervals: [] routes: [] security: allowAllNamespaces: false allowedGroups: [] allowedNamespaces: [] allowedUsers: [] deletionProtection: true service: serviceLevel: besteffort version: "7.2" size: plan: standard-1 tls: authClients: true enabled: true resourceRef: apiVersion: vshn.appcat.vshn.io/v1 kind: XVSHNRedis name: test-dkwj9 writeConnectionSecretToRef: name: acme-corp-1-30-redis ```
tobru added the
bug
label 2025-06-26 14:50:03 +00:00
Member

I assume that any objects containing no data should be omitted, right, @tobru? Or should they instead be set to null?

I assume that any objects containing no data should be omitted, right, @tobru? Or should they instead be set to `null`?
Member

Implemented the former assumption in #126

Implemented the former assumption in #126
tobru closed this issue 2025-06-27 06:53:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: servala/servala-portal#124
No description provided.