Skip to content

Commit

Permalink
Add Istio UIs to module (#542)
Browse files Browse the repository at this point in the history
* Add Istio UIs to chart

* Add workflow

* create-ns

* Create ns

* Adjust script

* Update virtualservice expand

* Apply suggestions from code review

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

* Post review adjustment

* Remove unneeded command

* Adjust post-review

---------

Co-authored-by: Natalia Sitko <[email protected]>
  • Loading branch information
barchw and nataliasitko authored Jan 3, 2024
1 parent 0654cec commit b2f2ac5
Show file tree
Hide file tree
Showing 70 changed files with 8,767 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ui-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Jobs defined in this file are responsible for things that do not require container image
# but still relevant to the codebase such as unit tests, linting etc

name: Pull Request

on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]
paths:
- 'config/ui-extensions/**'
- 'config/crd/**'
- 'tests/ui/**'
- '.github/workflows/ui-tests.yaml'
branches:
- "main"
- 'release-**'

permissions:
contents: read

jobs:
run-ui-tests:
name: Run UI tests
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run tests
run: |
sudo echo "127.0.0.1 local.kyma.dev" | sudo tee -a /etc/hosts
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | sudo bash
IMG=europe-docker.pkg.dev/kyma-project/dev/istio-manager:PR-${{ github.event.number }} ./tests/ui/scripts/k3d-ci-kyma-dashboard-integration.sh
- uses: actions/upload-artifact@v3
if: always()
name: Export Cypress output
with:
name: cypress
path: tests/ui/cypress/
5 changes: 5 additions & 0 deletions config/ui-extensions/authorizationpolicies/dataSources
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
podSelector:
resource:
kind: Pod
version: v1
filter: $matchByLabelSelector($item, $root.spec.selector.matchLabels)
149 changes: 149 additions & 0 deletions config/ui-extensions/authorizationpolicies/details
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
header:
- source: spec.action
name: spec.action
- source: spec.provider
widget: Labels
name: spec.provider
resourceGraph:
colorVariant: 3
dataSources:
- source: podSelector
body:
- widget: Table
name: spec.rules
source: spec.rules
showHeader: false
visibility: $exists($value)
collapsibleTitle: '"Rule #" & $string($index + 1) & (" " & $join($keys($item), " "))'
collapsible:
- source: $item.from
widget: Table
name: spec.rules.from
disablePadding: true
showHeader: false
visibility: $exists($value)
collapsibleTitle: '"From #" & $string($index + 1) & (" " & $join($keys($item.source), " "))'
collapsible:
- source: source
widget: Panel
name: spec.rules.from.source
children:
- source: principals
name: spec.rules.from.source.principals
widget: JoinedArray
visibility: $exists($value)
- source: notPrincipals
name: spec.rules.from.source.notPrincipals
widget: Labels
visibility: $exists($value)
- source: requestPrincipals
name: spec.rules.from.source.requestPrincipals
widget: Labels
visibility: $exists($value)
- source: notRequestPrincipals
name: spec.rules.from.source.notRequestPrincipals
widget: Labels
visibility: $exists($value)
- source: namespaces
name: spec.rules.from.source.namespaces
widget: Labels
visibility: $exists($value)
- source: notNamespaces
name: spec.rules.from.source.notNamespaces
widget: Labels
visibility: $exists($value)
- source: ipBlocks
name: spec.rules.from.source.ipBlocks
widget: Labels
visibility: $exists($value)
- source: notIpBlocks
name: spec.rules.from.source.notIpBlocks
widget: Labels
visibility: $exists($value)
- source: remoteIpBlocks
name: spec.rules.from.source.remoteIpBlocks
widget: Labels
visibility: $exists($value)
- source: notRemoteIpBlocks
name: spec.rules.from.source.notRemoteIpBlocks
widget: Labels
visibility: $exists($value)
- source: $item.to
widget: Table
name: spec.rules.to
disablePadding: true
showHeader: false
visibility: $exists($value)
collapsibleTitle: '"To #" & $string($index + 1) & (" " & $join($keys($item.operation), " "))'
collapsible:
- source: operation
widget: Panel
name: spec.rules.to.operation
children:
- source: Hosts
name: spec.rules.to.operation.hosts
widget: Labels
visibility: $exists($value)
- source: notHosts
name: spec.rules.to.operation.notHosts
widget: Labels
visibility: $exists($value)
- source: ports
name: spec.rules.to.operation.ports
widget: Labels
visibility: $exists($value)
- source: notPorts
name: spec.rules.to.operation.notPorts
widget: Labels
visibility: $exists($value)
- source: methods
name: spec.rules.to.operation.methods
widget: Labels
visibility: $exists($value)
- source: notMethods
name: spec.rules.to.operation.notMethods
widget: Labels
visibility: $exists($value)
- source: paths
name: spec.rules.to.operation.paths
widget: Labels
visibility: $exists($value)
- source: notPaths
name: spec.rules.to.operation.notPaths
widget: Labels
visibility: $exists($value)
- source: when
widget: Table
name: spec.rules.when
visibility: $exists($value)
children:
- source: key
name: spec.rules.when.key
visibility: $exists($value)
- source: values
name: spec.rules.when.values
widget: JoinedArray
separator: break
visibility: $exists($value)
- source: notValues
name: spec.rules.when.notValues
widget: JoinedArray
separator: break
visibility: $exists($value)
- widget: Panel
name: spec.selector.matchLabels
disablePadding: true
children:
- source: $podSelector()
widget: ResourceList
disableCreate: true
visibility: $exists($root.spec.selector.matchLabels) and $boolean($root.spec.selector.matchLabels)
- source: spec.selector
widget: Panel
name: selector.matchesAllPods
visibility: $not($exists($value)) or $not($boolean($value))
header:
- source: spec.selector.matchLabels
widget: Labels
name: spec.selector.matchLabels
visibility: $exists($value) and $boolean($value)
181 changes: 181 additions & 0 deletions config/ui-extensions/authorizationpolicies/form
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
- path: spec.selector.matchLabels
widget: KeyValuePair
defaultExpanded: true
- path: spec.action
placeholder: placeholders.dropdown
simple: true
description: description.action
- path: spec.provider
widget: FormGroup
children:
- path: name
- path: spec.rules
widget: GenericList
simple: true
children:
- path: '[].from'
simple: true
widget: GenericList
children:
- path: '[].source'
simple: true
widget: FormGroup
defaultExpanded: true
children:
- path: principals
simple: true
widget: SimpleList
description: description.rules.from.principals
children:
- path: '[]'
simple: true
- path: notPrincipals
simple: true
widget: SimpleList
description: description.rules.from.notPrincipals
children:
- path: '[]'
simple: true
- path: requestPrincipals
simple: true
widget: SimpleList
description: description.rules.from.requestPrincipals
children:
- path: '[]'
simple: true
- path: notRequestPrincipals
simple: true
widget: SimpleList
description: description.rules.from.notRequestPrincipals
children:
- path: '[]'
simple: true
- path: namespaces
simple: true
widget: SimpleList
description: description.rules.from.namespaces
children:
- path: '[]'
simple: true
- path: notNamespaces
simple: true
widget: SimpleList
description: description.rules.from.notNamespaces
children:
- path: '[]'
simple: true
- path: ipBlocks
simple: true
widget: SimpleList
description: description.rules.from.ipBlocks
children:
- path: '[]'
simple: true
- path: notIpBlocks
simple: true
widget: SimpleList
description: description.rules.from.notIpBlocks
children:
- path: '[]'
simple: true
- path: remoteIpBlocks
simple: true
widget: SimpleList
description: description.rules.from.remoteIpBlocks
children:
- path: '[]'
simple: true
- path: notRemoteIpBlocks
simple: true
widget: SimpleList
description: description.rules.from.notRemoteIpBlocks
children:
- path: '[]'
simple: true
- path: '[].to'
simple: true
widget: GenericList
children:
- path: '[].operation'
simple: true
widget: FormGroup
defaultExpanded: true
children:
- path: hosts
simple: true
widget: SimpleList
description: description.rules.to.hosts
children:
- path: '[]'
simple: true
- path: notHosts
simple: true
widget: SimpleList
description: description.rules.to.notHosts
children:
- path: '[]'
simple: true
- path: ports
simple: true
widget: SimpleList
description: description.rules.to.ports
children:
- path: '[]'
simple: true
- path: notPorts
simple: true
widget: SimpleList
description: description.rules.to.notPorts
children:
- path: '[]'
simple: true
- path: methods
simple: true
widget: SimpleList
description: description.rules.to.methods
children:
- path: '[]'
simple: true
- path: notMethods
simple: true
widget: SimpleList
description: description.rules.to.notMethods
children:
- path: '[]'
simple: true
- path: paths
simple: true
widget: SimpleList
description: description.rules.to.paths
children:
- path: '[]'
simple: true
- path: notPaths
simple: true
widget: SimpleList
description: description.rules.to.notPaths
children:
- path: '[]'
simple: true
- path: '[].when'
simple: true
widget: GenericList
children:
- path: '[].key'
simple: true
widget: Text
description: description.rules.when.key
- path: '[].values'
simple: true
widget: SimpleList
description: description.rules.when.values
children:
- path: '[]'
simple: true
- path: '[].notValues'
simple: true
widget: SimpleList
description: description.rules.when.notValues
children:
- path: '[]'
simple: true
12 changes: 12 additions & 0 deletions config/ui-extensions/authorizationpolicies/general
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource:
kind: AuthorizationPolicy
group: security.istio.io
version: v1beta1
name: Authorization Policies
category: Istio
urlPath: authorizationpolicies
scope: namespace
description: >-
{{[Istio Authorization
Policy](https://istio.io/latest/docs/reference/config/security/authorization-policy/)}}
allows for workload access management in the mesh.
Loading

0 comments on commit b2f2ac5

Please sign in to comment.