diff --git a/CHANGELOG.md b/CHANGELOG.md index 98aee1182..33d1d220d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan ### Added +### Fixed + +### Changed + +## [v0.2.0](https://github.com/kobsio/kobs/releases/tag/v0.2.0) (2021-04-23) + +### Added + - [#29](https://github.com/kobsio/kobs/pull/29): Add a new dependencies section to the Application CR. These dependencies are used to show a topology graph for all Applications. - [#31](https://github.com/kobsio/kobs/pull/31): Add plugin support for Kubernetes resources. - [#32](https://github.com/kobsio/kobs/pull/32): Add support for container logs via the Kubernetes API. @@ -17,6 +25,7 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan - [#39](https://github.com/kobsio/kobs/pull/39): Add Opsgenie plugin to view alerts within an Application. - [#40](https://github.com/kobsio/kobs/pull/40): Add metric name suggestions for Prometheus plugin. - [#41](https://github.com/kobsio/kobs/pull/41): Add overview and Pods tab for resource details. +- [#42](https://github.com/kobsio/kobs/pull/42): Add VirtualService specification for Istio to the Helm chart. ### Fixed diff --git a/deploy/helm/kobs/Chart.yaml b/deploy/helm/kobs/Chart.yaml index 14b85477a..0246dbab8 100644 --- a/deploy/helm/kobs/Chart.yaml +++ b/deploy/helm/kobs/Chart.yaml @@ -4,5 +4,5 @@ description: Kubernetes Observability Platform type: application home: https://kobs.io icon: https://kobs.io/assets/images/logo.svg -version: 0.2.2 -appVersion: v0.1.0 +version: 0.3.0 +appVersion: v0.2.0 diff --git a/deploy/helm/kobs/templates/deployment.yaml b/deploy/helm/kobs/templates/deployment.yaml index 67ec0fabf..a7c0eacfc 100644 --- a/deploy/helm/kobs/templates/deployment.yaml +++ b/deploy/helm/kobs/templates/deployment.yaml @@ -30,15 +30,15 @@ spec: args: - --log.level={{ .Values.kobs.settings.logLevel }} - --log.format={{ .Values.kobs.settings.logFormat }} + {{- with .Values.kobs.env }} env: - {{- with .Values.kobs.env }} {{- toYaml . | nindent 12 }} - {{- end }} + {{- end }} ports: - name: http-web containerPort: 15219 protocol: TCP - - name: grpc-api + - name: grpc-web containerPort: 15220 protocol: TCP - name: http-metrics diff --git a/deploy/helm/kobs/templates/service.yaml b/deploy/helm/kobs/templates/service.yaml index 132652045..47add8444 100644 --- a/deploy/helm/kobs/templates/service.yaml +++ b/deploy/helm/kobs/templates/service.yaml @@ -12,9 +12,9 @@ spec: protocol: TCP name: http-web - port: 15220 - targetPort: grpc-api + targetPort: grpc-web protocol: TCP - name: grpc-api + name: grpc-web - port: 15221 targetPort: http-metrics protocol: TCP diff --git a/deploy/helm/kobs/templates/tests/test-connection.yaml b/deploy/helm/kobs/templates/tests/test-connection.yaml deleted file mode 100644 index 44d307dce..000000000 --- a/deploy/helm/kobs/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "kobs.fullname" . }}-test-connection" - labels: - {{- include "kobs.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "kobs.fullname" . }}:15222/health'] - restartPolicy: Never diff --git a/deploy/helm/kobs/templates/virtualservice.yaml b/deploy/helm/kobs/templates/virtualservice.yaml new file mode 100644 index 000000000..fbcac1fa7 --- /dev/null +++ b/deploy/helm/kobs/templates/virtualservice.yaml @@ -0,0 +1,63 @@ +{{- if .Values.istio.virtualService.create -}} +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ include "kobs.fullname" . }} + labels: + {{- include "kobs.labels" . | nindent 4 }} +spec: +{{- with .Values.istio.hosts }} + hosts: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- with .Values.istio.gateways }} + gateways: + {{- toYaml . | nindent 4 }} +{{- end }} + http: + {{- toYaml .Values.istio.virtualService.additionalRoutes | nindent 4 }} + - match: + - uri: + prefix: /clusters. + - uri: + prefix: /plugins. + route: + - destination: + host: {{ include "kobs.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local + port: + number: 15220 + corsPolicy: + allowOrigin: + - "*" + allowMethods: + - GET + - PUT + - DELETE + - POST + - OPTIONS + allowHeaders: + - keep-alive + - user-agent + - cache-control + - content-type + - content-transfer-encoding + - custom-header-1 + - x-accept-content-transfer-encoding + - x-accept-response-streaming + - x-user-agent + - x-grpc-web + - grpc-timeout + maxAge: 1728s + exposeHeaders: + - custom-header-1 + - grpc-status + - grpc-message + allowCredentials: true + timeout: {{ .Values.istio.virtualService.timeout }} + - route: + - destination: + host: {{ include "kobs.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local + port: + number: 15219 + timeout: 60s +{{- end }} diff --git a/deploy/helm/kobs/values.yaml b/deploy/helm/kobs/values.yaml index 340bccafb..bd17e98db 100644 --- a/deploy/helm/kobs/values.yaml +++ b/deploy/helm/kobs/values.yaml @@ -39,7 +39,7 @@ affinity: {} kobs: image: repository: kobsio/kobs - tag: v0.1.0 + tag: v0.2.0 pullPolicy: IfNotPresent ## Specify security settings for the kobs Container. They override settings made at the Pod level via the @@ -124,6 +124,28 @@ envoy: # cpu: 100m # memory: 128Mi +## If you are using Istio you can disable the Envoy sidecar in the Helm chart and use the Istio to get gRPC web working. +## +istio: + ## Create a VirtualService, with the correct routes for the gRPC API and the React UI for kobs. You can provide a list + ## of gateways and hosts for the VirtualService. + ## + virtualService: + create: false + + gateways: [] + # - gateway + + hosts: [] + # - chart-example.local + + timeout: 300s + + ## You can also add your own routes to the VirtualService. This can be used to add an oauth2-proxy to handle the + ## authentication for the dashboard. + ## + additionalRoutes: [] + ## Specifies whether a service account should be created. ## See: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ ## diff --git a/deploy/kustomize/kobs/deployment.yaml b/deploy/kustomize/kobs/deployment.yaml index 28abd1246..7b611a77c 100644 --- a/deploy/kustomize/kobs/deployment.yaml +++ b/deploy/kustomize/kobs/deployment.yaml @@ -22,7 +22,7 @@ spec: serviceAccountName: kobs containers: - name: kobs - image: "kobsio/kobs:0.1.0" + image: "kobsio/kobs:0.2.0" imagePullPolicy: IfNotPresent args: - --log.level=info diff --git a/docs/installation/helm.md b/docs/installation/helm.md index 24ac7e320..2a6d63817 100644 --- a/docs/installation/helm.md +++ b/docs/installation/helm.md @@ -60,7 +60,7 @@ helm upgrade kobs kobs/kobs | `tolerations` | Specify the tolerations for the kobs Pods. | `[]` | | `affinity` | Specify a node affinity or inter-pod affinity / anti-affinity for an advanced scheduling of the kobs Pods. | `{}` | | `kobs.image.repository` | The repository for the Docker image. | `kobsio/kobs` | -| `kobs.image.tag` | The tag of the Docker image which should be used. | `v0.1.0` | +| `kobs.image.tag` | The tag of the Docker image which should be used. | `v0.2.0` | | `kobs.image.pullPolicy` | The image pull policy for the Docker image. | `IfNotPresent` | | `kobs.securityContext` | Specify security settings for the kobs Container. They override settings made at the Pod level via the `podSecurityContext` when there is overlap. | `{}` | | `kobs.resources` | Set cpu and memory requests and limits for the kobs container. | `{}` | @@ -74,6 +74,11 @@ helm upgrade kobs kobs/kobs | `envoy.image.pullPolicy` | The image pull policy for the Docker image. | `IfNotPresent` | | `envoy.securityContext` | Specify security settings for the envoy Container. They override settings made at the Pod level via the `podSecurityContext` when there is overlap. | `{}` | | `envoy.resources` | Set cpu and memory requests and limits for the envoy container. | `{}` | +| `istio.virtualService.create` | Specifies whether a VirtualService should be created. | `false` | +| `istio.virtualService.gateways` | A list of gateways for the VirtualService. | `[]` | +| `istio.virtualService.hosts` | A list of hosts for the VirtualService. | `[]` | +| `istio.virtualService.timeout` | Timeout for gRPC requests. | `300s` | +| `istio.virtualService.additionalRoutes` | A list of additional routes for the VirtualService. | `[]` | | `serviceAccount.create` | Specifies whether a service account should be created. | `true` | | `serviceAccount.annotations` | Annotations to add to the service account. | `{}` | | `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `""` |