Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
feat: Enhance Services (#376)
Browse files Browse the repository at this point in the history
* Adjust services

* Enchance services

* Remove status Badge
  • Loading branch information
akucharska authored Sep 12, 2024
1 parent 5a6b4f2 commit 9f4ab05
Show file tree
Hide file tree
Showing 7 changed files with 486 additions and 191 deletions.
171 changes: 121 additions & 50 deletions environments/dev/dist/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1636,19 +1636,6 @@ details:
language: '''plaintext'''
source: spec.output.custom
visibility: $exists(spec.output.custom)
- name: Grafana-Loki
widget: Panel
visibility: $not($exists(spec.output.custom) or $exists(spec.output.http))
children:
- name: URL
source: spec.output.`grafana-loki`.url.value
- name: Labels
widget: Labels
source: spec.output.`grafana-loki`.labels
- name: Remove keys
widget: JoinedArray
separator: ','
source: spec.output.`grafana-loki`.removeKeys
- name: HTTP
widget: Panel
visibility: $exists(spec.output.http)
Expand Down Expand Up @@ -2722,29 +2709,129 @@ translations:
spec.servicePlanID: Plan ID
chooseSecretKey: Choose Secret Key
---
dataSources:
apirules:
resource:
kind: APIRule
group: gateway.kyma-project.io
version: v1beta1
filter: $item.spec.service.name = $root.metadata.name
podSelector:
resource:
kind: Pod
version: v1
filter: $matchByLabelSelector($item, $root.spec.selector)
subscriptions:
resource:
kind: Subscription
group: eventing.kyma-project.io
version: v1alpha1
filter: >-
$substringAfter($substringBefore($item.spec.sink, '.'), '://') =
$root.metadata.name
relatedDNSEntry:
resource:
kind: DNSEntry
group: dns.gardener.cloud
version: v1alpha1
filter: >-
$filter($item.spec.targets, function ($v, $i, $a) {
$contains($root.status.loadBalancer.ingress.ip, $v)})
details:
resourceGraph:
dataSources:
- source: apirules
- source: podSelector
- source: subscriptions
- source: relatedDNSEntry
status:
body:
- name: Conditions
source: status.conditions
visibility: $exists(status.conditions)
widget: ConditionList
- name: External IPs
source: >-
$count(status.loadBalancer.ingress) ?
$map(status.loadBalancer.ingress, function($value) {$value.ip ?
$value.ip : $value.hostname}) ~> $join(', '):
($count($item.spec.externalIPs) ? $item.spec.externalIPs ~> $join(',
'): '-')
header:
- name: Controlled by
source: metadata.ownerReferences
widget: ControlledBy
- name: Service Type
source: spec.type
- name: Cluster IP
source: spec.clusterIP
- name: Ports
source: >-
$count(spec.ports) ? $map(spec.ports, function($value) {$value.port =
$value.targetPort ? [$string($value.port), '/',
$string($value.protocol)] ~> $join('') : [ $string($value.name), ' (',
$string($value.port), ') --> (', $string($value.targetPort), ')'] ~>
$join('') }) ~> $join(', ') : '-'
- name: External IPs
source: >-
$count(status.loadBalancer.ingress) ? $map(status.loadBalancer.ingress,
function($value) {$value.ip ? $value.ip : $value.hostname}) ~> $join(',
'): ($count($item.spec.externalIPs) ? $item.spec.externalIPs ~> $join(',
'): '-')
body:
- name: Specification
widget: Panel
children:
- name: Service Type
source: spec.type
- name: Cluster IP
source: spec.clusterIP
visibility: $exists(spec.clusterIP)
- name: Cluster IPs
source: spec.clusterIPs
visibility: $exists(spec.clusterIPs)
widget: Labels
- name: Ports
source: >-
$count(spec.ports) ? $map(spec.ports, function($value) {$value.port
= $value.targetPort ? [$string($value.port), '/',
$string($value.protocol)] ~> $join('') : [ $string($value.name), '
(', $string($value.port), ') --> (', $string($value.targetPort),
')'] ~> $join('') }) ~> $join(', ') : '-'
- name: Selector
source: spec.selector
visibility: $exists(spec.selector)
widget: Labels
- name: Allocate Load Balancer Node Ports
source: spec.allocateLoadBalancerNodePorts
visibility: $exists(spec.allocateLoadBalancerNodePorts)
- name: External IPs
source: spec.externalIPs
visibility: $exists(spec.externalIPs)
widget: Labels
- name: External Name
source: spec.externalName
visibility: $exists(spec.externalName)
- name: External Traffic Policy
source: spec.externalTrafficPolicy
visibility: $exists(spec.externalTrafficPolicy)
- name: Health Check Node Port
source: spec.healthCheckNodePort
visibility: $exists(spec.healthCheckNodePort)
- name: Internal Traffic Policy
source: spec.internalTrafficPolicy
visibility: $exists(spec.internalTrafficPolicy)
- name: IP Families
source: spec.ipFamilies
visibility: $exists(spec.ipFamilies)
widget: Labels
- name: IP Family Policy
source: spec.ipFamilyPolicy
visibility: $exists(spec.ipFamilyPolicy)
- name: Load Balancer Class
source: spec.loadBalancerClass
visibility: $exists(spec.loadBalancerClass)
- name: Load Balancer IP
source: spec.loadBalancerIP
visibility: $exists(spec.loadBalancerIP)
- name: Load Balancer Source Ranges
source: spec.loadBalancerSourceRanges
visibility: $exists(spec.loadBalancerSourceRanges)
- name: Publish Not Ready Addresses
source: spec.publishNotReadyAddresses
visibility: $exists(spec.publishNotReadyAddresses)
- name: Session Affinity
source: spec.sessionAffinity
visibility: $exists(spec.sessionAffinity)
- name: Session Affinity Config Timeout Seconds
source: spec.sessionAffinityConfig.clientIP.timeoutSeconds
visibility: $exists(spec.sessionAffinityConfig.clientIP.timeoutSeconds)
- name: Traffic Distribution
source: spec.trafficDistribution
visibility: $exists(spec.trafficDistribution)
- widget: ResourceList
source: $subscriptions()
name: Subscriptions
Expand Down Expand Up @@ -2798,6 +2885,10 @@ details:
widget: Labels
name: Selector
visibility: $exists($value) and $boolean($value)
- widget: EventList
name: Events
filter: $matchEvents($$, $root.kind, $root.metadata.name)
hideInvolvedObjects: true
form:
- widget: KeyValuePair
path: spec.selector
Expand Down Expand Up @@ -2961,26 +3052,6 @@ list:
function($value) {$value.ip ? $value.ip : $value.hostname}) ~> $join(',
'): ($count($item.spec.externalIPs) ? $item.spec.externalIPs ~> $join(',
'): '-')
dataSources:
apirules:
resource:
kind: APIRule
group: gateway.kyma-project.io
version: v1beta1
filter: $item.spec.service.name = $root.metadata.name
podSelector:
resource:
kind: Pod
version: v1
filter: $matchByLabelSelector($item, $root.spec.selector)
subscriptions:
resource:
kind: Subscription
group: eventing.kyma-project.io
version: v1alpha1
filter: >-
$substringAfter($substringBefore($item.spec.sink, '.'), '://') =
$root.metadata.name
general:
resource:
kind: Service
Expand Down
4 changes: 2 additions & 2 deletions environments/dev/env.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export WEB_IMAGE=v20240905-f87fc8bf
export WEB_IMAGE=v20240912-270e75ec
export BACKEND_IMAGE=v20240827-d5197683
export LOCAL_IMAGE=v20240905-f87fc8bf
export LOCAL_IMAGE=v20240912-270e75ec
Loading

0 comments on commit 9f4ab05

Please sign in to comment.