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,8 +109,6 @@ spec:
proxy:
type: boolean
type: object
inline:
properties:
clusterIP:
type: string
image:
@ -123,11 +121,8 @@ spec:
type: object
nodePort:
type: integer
type: object
sshkey:
type: string
required:
- inline
type: object
type: array
loadBalancer:

View File

@ -1,43 +1,65 @@
apiVersion: airship.airshipit.org/v1
kind: SIPCluster
metadata:
name: sipcluster-test1
name: sipcluster-test
namespace: sipcluster-system
finalizers:
- sip.airship.airshipit.org/finalizer
spec:
clusterName: subcluster-test1
# TODO: This field will be removed in the future.
clusterName: subcluster-test
nodes:
Worker:
vmFlavor: 'vino.airshipit.org/flavor=worker'
spreadTopology: 'PerHost' # Support dont'care option.
count:
active: 1 #driven by capi node number
standby: 1 #slew for upgrades etc
ControlPlane:
vmFlavor: 'vino.airshipit.org/flavor=control-plane'
spreadTopology: 'PerRack'
vmFlavor: vino.airshipit.org/flavor=control-plane
spreadTopology: PerRack
count:
active: 1
standby: 1
infra:
- serviceType: auth
image: sshpod:foo
nodeLabels:
- airship-control-plane
nodePort: 7023
Worker:
vmFlavor: vino.airshipit.org/flavor=worker
spreadTopology: PerHost
count:
active: 1
standby: 1 # Slew for upgrades
services:
# NOTE: The auth service has not yet been implemented.
# auth:
# - image: sshpod:foo
# # 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
- serviceType: jumphost
redfish:
# NOTE: clusterIP has not yet been implemented.
# clusterIP: 1.2.3.4 # IP of the base cluster VIP
bmc:
proxy: false
image: quay.io/airshipit/jump-host:dev
nodeLabels:
- airship-control-plane
nodePort: 7022
nodeInterfaceId: oam-ipv4
- serviceType: loadbalancer
image: haproxy:2.3.2
nodeLabels:
- airship-control-plane
# NOTE: SSHKey not implemented but required by schema.
SSHKey: >
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM/UeCgfawmdt5ehghEk/GCGkrKgdt/
DY6NuFOdMZsPUmO3Ryitzw/pqwUXvpnFjCZo2AtxrZhwjbkJRluoVVEBDh1R5YSGHY9el
1AkTJj F6bCayjAHTW32pX93NDn4/6ZtTtiVhmZlCr2wK6uZvh4ZB1vBBLEMywME6NaJO
OPXId+fc62wwEQqv3PH9A1wMOwPMXvX/r/wm8nUoEguEwC50rPFmTEHkvAi4BWAjfLDOo
nU4Mo/cYCrZyrU74GbMR41IxtCcdeFmHSNTVFvQNG9nBSWeoM1nIquoricw+bYYp5QDJ0
3m7yD54vJNiPIMr6TaUwGObaAF95I/Q/CgHbEEAYIn33+jj1g2N4BjhXE4B948CW/DfC1
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
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>
<tr>
<td>
<code>inline</code><br>
<code>SIPClusterService</code><br>
<em>
<a href="#airship.airshipit.org/v1.SIPClusterService">
SIPClusterService
@ -67,6 +67,9 @@ SIPClusterService
</em>
</td>
<td>
<p>
(Members of <code>SIPClusterService</code> are embedded into this type.)
</p>
</td>
</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.
type JumpHostService struct {
SIPClusterService `json:"inline"`
SIPClusterService `json:",inline"`
BMC *BMCOpts `json:"bmc,omitempty"`
SSHKey string `json:"sshkey,omitempty"`
}