Fix JumpHost inline JSON tag and CR sample

This change updates the sample CR to align to the most recent SIPCluster
CRD changes and fixes a JSON tag that required a field named "inline" in
the JumpHost service.

Signed-off-by: Drew Walters <andrew.walters@att.com>
Change-Id: I6ebbeb805d018c04707b42e89a0484dd8941f411
This commit is contained in:
Drew Walters 2021-02-23 21:16:02 +00:00
parent 845ff65d85
commit 68fe3686fa
4 changed files with 70 additions and 50 deletions

View File

@ -109,25 +109,20 @@ spec:
proxy: proxy:
type: boolean type: boolean
type: object type: object
inline: clusterIP:
properties: type: string
clusterIP: image:
type: string type: string
image: nodeInterfaceId:
type: string type: string
nodeInterfaceId: nodeLabels:
type: string additionalProperties:
nodeLabels: type: string
additionalProperties:
type: string
type: object
nodePort:
type: integer
type: object type: object
nodePort:
type: integer
sshkey: sshkey:
type: string type: string
required:
- inline
type: object type: object
type: array type: array
loadBalancer: loadBalancer:

View File

@ -1,43 +1,65 @@
apiVersion: airship.airshipit.org/v1 apiVersion: airship.airshipit.org/v1
kind: SIPCluster kind: SIPCluster
metadata: metadata:
name: sipcluster-test1 name: sipcluster-test
namespace: sipcluster-system namespace: sipcluster-system
finalizers: finalizers:
- sip.airship.airshipit.org/finalizer - sip.airship.airshipit.org/finalizer
spec: spec:
clusterName: subcluster-test1 # TODO: This field will be removed in the future.
nodes: clusterName: subcluster-test
Worker: nodes:
vmFlavor: 'vino.airshipit.org/flavor=worker' ControlPlane:
spreadTopology: 'PerHost' # Support dont'care option. vmFlavor: vino.airshipit.org/flavor=control-plane
count: spreadTopology: PerRack
active: 1 #driven by capi node number count:
standby: 1 #slew for upgrades etc active: 1
ControlPlane: standby: 1
vmFlavor: 'vino.airshipit.org/flavor=control-plane' Worker:
spreadTopology: 'PerRack' vmFlavor: vino.airshipit.org/flavor=worker
count: spreadTopology: PerHost
active: 1 count:
standby: 1 active: 1
infra: standby: 1 # Slew for upgrades
- serviceType: auth services:
image: sshpod:foo # NOTE: The auth service has not yet been implemented.
nodeLabels: # auth:
- airship-control-plane # - image: sshpod:foo
nodePort: 7023 # # NOTE: nodeLabels not yet implemented.
# nodeLabels:
# kubernetes.io/os: linux
# nodePort: 7023
# nodeInterfaceId: oam-ipv4
# clusterIP: 1.2.3.4 # IP of the base cluster VIP
jumpHost:
- image: quay.io/airshipit/jump-host:latest
# NOTE: nodeLabels not yet implemented.
# nodeLabels:
# kubernetes.io/os: linux
nodePort: 30001
nodeInterfaceId: oam-ipv4 nodeInterfaceId: oam-ipv4
- serviceType: jumphost # NOTE: clusterIP has not yet been implemented.
redfish: # clusterIP: 1.2.3.4 # IP of the base cluster VIP
bmc:
proxy: false proxy: false
image: quay.io/airshipit/jump-host:dev # NOTE: SSHKey not implemented but required by schema.
nodeLabels: SSHKey: >
- airship-control-plane ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM/UeCgfawmdt5ehghEk/GCGkrKgdt/
nodePort: 7022 DY6NuFOdMZsPUmO3Ryitzw/pqwUXvpnFjCZo2AtxrZhwjbkJRluoVVEBDh1R5YSGHY9el
nodeInterfaceId: oam-ipv4 1AkTJj F6bCayjAHTW32pX93NDn4/6ZtTtiVhmZlCr2wK6uZvh4ZB1vBBLEMywME6NaJO
- serviceType: loadbalancer OPXId+fc62wwEQqv3PH9A1wMOwPMXvX/r/wm8nUoEguEwC50rPFmTEHkvAi4BWAjfLDOo
image: haproxy:2.3.2 nU4Mo/cYCrZyrU74GbMR41IxtCcdeFmHSNTVFvQNG9nBSWeoM1nIquoricw+bYYp5QDJ0
nodeLabels: 3m7yD54vJNiPIMr6TaUwGObaAF95I/Q/CgHbEEAYIn33+jj1g2N4BjhXE4B948CW/DfC1
- airship-control-plane KTn2zR3ZroshghURY9Z0J1BjPsCktiTsOs3eBuUH31WCjNNtgaCJNp4SIQHd1je6m4igk
7pnr532a/fxdu9Y5udLJ7+ecqeQmDBFIf8UvpZFNktntOQQPq8G/XI3tvjTGl6M2RGIfM
= sample-key
loadBalancer:
- image: haproxy:2.3.2
# NOTE: nodeLabels not yet implemented.
# nodeLabels:
# kubernetes.io/os: linux
nodePort: 30000 nodePort: 30000
nodeInterfaceId: oam-ipv4 nodeInterfaceId: oam-ipv4
# NOTE: clusterIP has not yet been implemented.
# clusterIP: 1.2.3.4 # IP of the base cluster VIP

View File

@ -59,7 +59,7 @@ bool
<tbody> <tbody>
<tr> <tr>
<td> <td>
<code>inline</code><br> <code>SIPClusterService</code><br>
<em> <em>
<a href="#airship.airshipit.org/v1.SIPClusterService"> <a href="#airship.airshipit.org/v1.SIPClusterService">
SIPClusterService SIPClusterService
@ -67,6 +67,9 @@ SIPClusterService
</em> </em>
</td> </td>
<td> <td>
<p>
(Members of <code>SIPClusterService</code> are embedded into this type.)
</p>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -85,7 +85,7 @@ func (s SIPClusterServices) GetAll() []SIPClusterService {
// JumpHostService is an infrastructure service type that represents the sub-cluster jump-host service. // JumpHostService is an infrastructure service type that represents the sub-cluster jump-host service.
type JumpHostService struct { type JumpHostService struct {
SIPClusterService `json:"inline"` SIPClusterService `json:",inline"`
BMC *BMCOpts `json:"bmc,omitempty"` BMC *BMCOpts `json:"bmc,omitempty"`
SSHKey string `json:"sshkey,omitempty"` SSHKey string `json:"sshkey,omitempty"`
} }