Skip to content

[dev-v2.10] Add chart for Supportability Review Operator #5320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/hidden: "true"
catalog.cattle.io/namespace: sr-operator-system
catalog.cattle.io/release-name: rancher-supportability-review-crd
apiVersion: v1
description: Installs the CRDs for rancher-supportability-review.
name: rancher-supportability-review-crd
type: application
version: 105.0.0+up0.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# rancher-supportability-review-crd
A Rancher chart that installs the CRDs used by rancher-supportability-review.
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: reviewbundles.sr.cattle.io
spec:
group: sr.cattle.io
names:
kind: ReviewBundle
plural: reviewbundles
singular: reviewbundle
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .status.timestamp
name: Timestamp
type: string
name: v1
schema:
openAPIV3Schema:
properties:
spec:
properties:
analyzeClusters:
items:
nullable: true
type: string
nullable: true
type: array
debug:
type: boolean
dev:
type: boolean
excludeClusters:
items:
nullable: true
type: string
nullable: true
type: array
parallelCollection:
type: boolean
sonobuoyNamespace:
nullable: true
type: string
sonobuoyTimeout:
type: integer
tolerations:
items:
properties:
effect:
nullable: true
type: string
key:
nullable: true
type: string
operator:
nullable: true
type: string
tolerationSeconds:
nullable: true
type: integer
value:
nullable: true
type: string
type: object
nullable: true
type: array
type: object
status:
properties:
checkResult:
nullable: true
type: string
clusterCount:
type: integer
conditions:
items:
properties:
lastTransitionTime:
nullable: true
type: string
lastUpdateTime:
nullable: true
type: string
message:
nullable: true
type: string
reason:
nullable: true
type: string
status:
nullable: true
type: string
type:
nullable: true
type: string
type: object
nullable: true
type: array
display:
nullable: true
properties:
error:
type: boolean
message:
nullable: true
type: string
state:
nullable: true
type: string
transitioning:
type: boolean
type: object
fileName:
nullable: true
type: string
fileSize:
type: integer
timestamp:
nullable: true
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
21 changes: 21 additions & 0 deletions charts/rancher-supportability-review/105.0.0+up0.1.0/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
annotations:
catalog.cattle.io/auto-install: rancher-supportability-review-crd=match
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Supportability Review
catalog.cattle.io/namespace: sr-operator-system
catalog.cattle.io/os: linux
catalog.cattle.io/permits-os: linux
catalog.cattle.io/provides-gvr: sr.cattle.io.reviewbundles/v1
catalog.cattle.io/rancher-version: '>= 2.10.0 < 2.11.0'
catalog.cattle.io/release-name: rancher-supportability-review
catalog.cattle.io/type: cluster-tool
catalog.cattle.io/ui-component: rancher-supportability-review
apiVersion: v1
appVersion: 0.1.0
description: The rancher-supportability-review operator enables the functionality
of Supportability Reviews for Rancher.
icon: https://charts.rancher.io/assets/logos/cis-kube-bench.svg
keywords:
- support
name: rancher-supportability-review
version: 105.0.0+up0.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Rancher Supportability Review Chart

The supportability-review-operator enables running Supportability Reviews.

# Installation

```
helm install rancher-supportability-review ./ --create-namespace -n sr-operator-system
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Rancher Supportability Review

This chart is used for Supportability Review of Rancher.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
questions:
- variable: rancher.url
label: Rancher URL
default: ""
description: "The URL of the Rancher server."
type: string
required: true
group: Rancher Configuration

- variable: rancher.token
label: Rancher Token
default: ""
description: "The access token for the Rancher server."
type: string
required: true
group: Rancher Configuration

- variable: image.collector.repository
label: SR Collector image Repository
default: "docker.io/rancher/supportability-review"
description: "The repository of SR Collector image."
type: string
required: false
group: Images

- variable: image.collector.tag
label: SR Collector image Tag
default: "latest"
description: "The repository of SR Collector Tag."
type: string
required: false
group: Images

- variable: image.analyzer.repository
label: SR Analyzer image Repository
default: "docker.io/rancher/supportability-review-internal"
description: "The repository of SR Analyzer image."
type: string
required: false
group: Images

- variable: image.analyzer.tag
label: SR Analyzer image Tag
default: "latest"
description: "The tag of SR Analyzer image."
type: string
required: false
group: Images

- variable: image.operator.repository
label: SR Operator image Repository
default: "docker.io/rancher/supportability-review-operator"
description: "The repository of SR Operator image."
type: string
required: false
group: Images

- variable: image.operator.tag
label: SR Operator image tag
default: "latest"
description: "The tag of SR Operator image."
type: string
required: false
group: Images

- variable: image.appFrontend.repository
label: App frontend image Repository
default: "docker.io/rancher/supportability-review-app-frontend"
description: "The repository of App frontend image."
type: string
required: false
group: Images

- variable: image.appFrontend.tag
label: App frontend image tag
default: "latest"
description: "The tag of App frontend image."
type: string
required: false
group: Images
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "rancher-supportability-review.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "rancher-supportability-review.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "rancher-supportability-review.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "rancher-supportability-review.labels" -}}
helm.sh/chart: {{ include "rancher-supportability-review.chart" . }}
{{ include "rancher-supportability-review.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "rancher-supportability-review.selectorLabels" -}}
app.kubernetes.io/name: {{ include "rancher-supportability-review.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "rancher-supportability-review.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "rancher-supportability-review.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/* Ensure namespace is set the same everywhere */}}
{{- define "sr.namespace" -}}
{{- .Release.Namespace | default "sr-operator-system" -}}
{{- end -}}

{{- define "system_default_registry" -}}
{{- if .Values.global.cattle.systemDefaultRegistry -}}
{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
{{- else -}}
{{- "" -}}
{{- end -}}
{{- end -}}

{{/*
Windows cluster will add default taint for linux nodes,
add below linux tolerations to workloads could be scheduled to those linux nodes
*/}}
{{- define "linux-node-tolerations" -}}
- key: "cattle.io/os"
value: "linux"
effect: "NoSchedule"
operator: "Equal"
{{- end -}}

{{- define "linux-node-selector" -}}
kubernetes.io/os: linux
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sr-bundle-app-frontend-deployment
namespace: sr-operator-system
spec:
replicas: 1
selector:
matchLabels:
sr-app: app-frontend
template:
metadata:
labels:
sr-app: app-frontend
spec:
containers:
- image: {{ .Values.image.appFrontend.repository }}:{{ .Values.image.appFrontend.tag }}
imagePullPolicy: Always
name: app-frontend
ports:
- containerPort: 80
resources:
requests:
memory: "100Mi"
cpu: "10m"
ephemeral-storage: "1Gi"
limits:
memory: "1Gi"
cpu: "100m"
ephemeral-storage: "10Gi"
nodeSelector:
kubernetes.io/os: linux
---
apiVersion: v1
kind: Service
metadata:
name: sr-bundle-app-frontend-service
namespace: sr-operator-system
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
sr-app: app-frontend
Loading
Loading