Skip to content

Commit

Permalink
Busola UI extension for Istio operator spec (#290)
Browse files Browse the repository at this point in the history
* Initial

* Namings

* components and translations

* panel

* advanced

* Details

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/translations

Co-authored-by: Natalia Sitko <[email protected]>

* Update config/ui-extensions/istios/general

Co-authored-by: Natalia Sitko <[email protected]>

* quotes

* Refactor manifest templates with int tests

* We do not have CR conditions atm

---------

Co-authored-by: Natalia Sitko <[email protected]>
  • Loading branch information
videlov and nataliasitko authored Aug 7, 2023
1 parent 92b1660 commit 827d501
Show file tree
Hide file tree
Showing 10 changed files with 390 additions and 24 deletions.
2 changes: 2 additions & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ resources:
- ../rbac
- ../manager
- ../scheduling
- ../ui-extensions

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- ../webhook
Expand Down
116 changes: 116 additions & 0 deletions config/ui-extensions/istios/details
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
header:
- name: Ready
source: status.state
widget: Badge
highlights:
positive:
- 'Ready'
body:
- widget: Tabs
children:
- name: General
children:
- widget: Panel
name: Configuration
children:
- source: spec.config.numTrustedProxies
name: config.numTrustedProxies
visibility: '$exists($value)'
- name: Components
children:
- widget: Panel
name: Pilot
children:
- source: spec.components.pilot.k8s.hpaSpec.minReplicas
name: k8s.hpaSpec.minReplicas
visibility: '$exists($value)'
- source: spec.components.pilot.k8s.hpaSpec.maxReplicas
name: k8s.hpaSpec.maxReplicas
visibility: '$exists($value)'
- source: spec.components.pilot.k8s.strategy.rollingUpdate.maxSurge
name: k8s.strategy.rollingUpdate.maxSurge
visibility: '$exists($value)'
- source: spec.components.pilot.k8s.strategy.rollingUpdate.maxUnavailable
name: k8s.strategy.rollingUpdate.maxUnavailable
visibility: '$exists($value)'
- source: spec.components.pilot.k8s.resources.limits.cpu
name: k8s.resources.limits.cpu
visibility: '$exists($value)'
- source: spec.components.pilot.k8s.resources.limits.memory
name: k8s.resources.limits.memory
visibility: '$exists($value)'
- source: spec.components.pilot.k8s.resources.requests.cpu
name: k8s.resources.requests.cpu
visibility: '$exists($value)'
- source: spec.components.pilot.k8s.resources.requests.memory
name: k8s.resources.requests.memory
visibility: '$exists($value)'
- widget: Panel
name: Ingress Gateway
children:
- source: spec.components.ingressGateway.k8s.hpaSpec.minReplicas
name: k8s.hpaSpec.minReplicas
visibility: '$exists($value)'
- source: spec.components.ingressGateway.k8s.hpaSpec.maxReplicas
name: k8s.hpaSpec.maxReplicas
visibility: '$exists($value)'
- source: spec.components.ingressGateway.k8s.strategy.rollingUpdate.maxSurge
name: k8s.strategy.rollingUpdate.maxSurge
visibility: '$exists($value)'
- source: spec.components.ingressGateway.k8s.strategy.rollingUpdate.maxUnavailable
name: k8s.strategy.rollingUpdate.maxUnavailable
visibility: '$exists($value)'
- source: spec.components.ingressGateway.k8s.resources.limits.cpu
name: k8s.resources.limits.cpu
visibility: '$exists($value)'
- source: spec.components.ingressGateway.k8s.resources.limits.memory
name: k8s.resources.limits.memory
visibility: '$exists($value)'
- source: spec.components.ingressGateway.k8s.resources.requests.cpu
name: k8s.resources.requests.cpu
visibility: '$exists($value)'
- source: spec.components.ingressGateway.k8s.resources.requests.memory
name: k8s.resources.requests.memory
visibility: '$exists($value)'
- widget: Panel
name: CNI
children:
- source: spec.components.cni.k8s.resources.limits.cpu
name: k8s.resources.limits.cpu
visibility: '$exists($value)'
- source: spec.components.cni.k8s.resources.limits.memory
name: k8s.resources.limits.memory
visibility: '$exists($value)'
- source: spec.components.cni.k8s.resources.requests.cpu
name: k8s.resources.requests.cpu
visibility: '$exists($value)'
- source: spec.components.cni.k8s.resources.requests.memory
name: k8s.resources.requests.memory
visibility: '$exists($value)'
- source: spec.components.cni.k8s.affinity
name: k8s.affinity
widget: CodeViewer
description: "Kubernetes documentation for {{[Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)}}"
language: "'yaml'"
visibility: '$exists($value)'
- widget: Panel
name: Proxy
children:
- source: spec.components.proxy.k8s.resources.limits.cpu
name: k8s.resources.limits.cpu
visibility: '$exists($value)'
- source: spec.components.proxy.k8s.resources.limits.memory
name: k8s.resources.limits.memory
visibility: '$exists($value)'
- source: spec.components.proxy.k8s.resources.requests.cpu
name: k8s.resources.requests.cpu
visibility: '$exists($value)'
- source: spec.components.proxy.k8s.resources.requests.memory
name: k8s.resources.requests.memory
visibility: '$exists($value)'
- name: Reconciliation
children:
- widget: EventList
filter: '$matchEvents($$, $root.kind, $root.metadata.name)'
name: Events
defaultType: information
205 changes: 205 additions & 0 deletions config/ui-extensions/istios/form
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
- path: spec.config
simple: true
name: General
widget: FormGroup
defaultExpanded: true
children:
- path: numTrustedProxies
simple: true
name: config.numTrustedProxies
inputInfo: inputInfo.config.numTrustedProxies
value:
type: number
- path: spec.components
name: Components
widget: FormGroup
defaultExpanded: true
children:
- path: 'pilot'
name: Pilot
widget: FormGroup
defaultExpanded: false
children:
- path: 'k8s.hpaSpec'
name: k8s.hpaSpec
widget: FormGroup
defaultExpanded: false
children:
- path: 'minReplicas'
name: k8s.hpaSpec.minReplicas
inputInfo: inputInfo.hpaSpec.minReplicas
value:
type: number
- path: 'maxReplicas'
name: k8s.hpaSpec.maxReplicas
inputInfo: inputInfo.hpaSpec.maxReplicas
value:
type: number
- path: 'k8s.strategy.rollingUpdate'
name: k8s.strategy.rollingUpdate
widget: FormGroup
defaultExpanded: false
type: object
properties:
maxSurge:
type: string
maxUnavailable:
type: string
children:
- path: 'maxSurge'
name: k8s.strategy.rollingUpdate.maxSurge
inputInfo: inputInfo.rollingUpdate.maxSurge
value:
type: string
pattern: ^\d+%?$
- path: 'maxUnavailable'
name: k8s.strategy.rollingUpdate.maxUnavailable
inputInfo: inputInfo.rollingUpdate.maxUnvailable
value:
type: string
pattern: ^\d+%?$
- path: 'k8s.resources.limits'
name: Resource Limits
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.limits.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.limits.memory
- path: 'k8s.resources.requests'
name: Resource Requests
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.requests.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.requests.memory
- path: 'ingressGateway'
name: Ingress Gateway
widget: FormGroup
defaultExpanded: false
children:
- path: 'k8s.hpaSpec'
name: k8s.hpaSpec
widget: FormGroup
defaultExpanded: false
children:
- path: 'minReplicas'
name: k8s.hpaSpec.minReplicas
inputInfo: inputInfo.hpaSpec.minReplicas
value:
type: number
- path: 'maxReplicas'
name: k8s.hpaSpec.maxReplicas
inputInfo: inputInfo.hpaSpec.maxReplicas
value:
type: number
- path: 'k8s.strategy.rollingUpdate'
name: k8s.strategy.rollingUpdate
widget: FormGroup
defaultExpanded: false
type: object
properties:
maxSurge:
type: string
maxUnavailable:
type: string
children:
- path: 'maxSurge'
name: k8s.strategy.rollingUpdate.maxSurge
inputInfo: inputInfo.rollingUpdate.maxSurge
value:
type: string
pattern: ^\d+%?$
- path: 'maxUnavailable'
name: k8s.strategy.rollingUpdate.maxUnavailable
inputInfo: inputInfo.rollingUpdate.maxUnvailable
value:
type: string
pattern: ^\d+%?$
- path: 'k8s.resources.limits'
name: Resource Limits
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.limits.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.limits.memory
- path: 'k8s.resources.requests'
name: Resource Requests
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.requests.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.requests.memory
- path: 'cni'
name: CNI
widget: FormGroup
defaultExpanded: false
children:
- path: 'k8s.affinity'
widget: CodeEditor
inputInfo: k8s.affinity
language: "'yaml'"
- path: 'k8s.resources.limits'
name: Resource Limits
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.limits.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.limits.memory
- path: 'k8s.resources.requests'
name: Resource Requests
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.requests.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.requests.memory
- path: 'proxy'
name: Proxy
widget: FormGroup
defaultExpanded: false
children:
- path: 'k8s.resources.limits'
name: Resource Limits
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.limits.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.limits.memory
- path: 'k8s.resources.requests'
name: Resource Requests
widget: FormGroup
defaultExpanded: false
children:
- path: 'cpu'
name: k8s.resources.cpu
inputInfo: inputInfo.requests.cpu
- path: 'memory'
name: k8s.resources.memory
inputInfo: inputInfo.requests.memory
15 changes: 15 additions & 0 deletions config/ui-extensions/istios/general
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource:
kind: Istio
group: operator.kyma-project.io
version: v1alpha2
urlPath: istios
category: Kyma
name: Istio
scope: namespace
features:
actions:
disableCreate: true
disableDelete: true
description: >-
{{[Istio CR](https://github.com/kyma-project/istio/blob/main/config/samples/operator_v1alpha2_istio.yaml)}}
describes the Istio module
15 changes: 15 additions & 0 deletions config/ui-extensions/istios/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
configMapGenerator:
- name: ui.operator.kyma-project.io
namespace: kyma-system
files:
- general
- form
- list
- details
- translations
options:
disableNameSuffixHash: true
labels:
app.kubernetes.io/name: istios.operator.kyma-project.io
busola.io/extension: resource
busola.io/extension-version: "0.5"
6 changes: 6 additions & 0 deletions config/ui-extensions/istios/list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: Ready
source: status.state
widget: Badge
highlights:
positive:
- 'Ready'
Loading

0 comments on commit 827d501

Please sign in to comment.