UNCLASSIFIED

Commit 7cc15303 authored by Nick Nellis's avatar Nick Nellis
Browse files

migrated chart from upstream

parent a0e794ec
Pipeline #183483 failed with stages
in 11 minutes and 30 seconds
include:
- project: 'platform-one/big-bang/pipeline-templates/pipeline-templates'
ref: master
file: '/templates/package-tests.yml'
# Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Changed
- Copied default CR file into values.yaml from here https://github.com/kiali/kiali-operator/blob/v1.28/deploy/kiali/kiali_cr.yaml
* @nick_tetrate
# Contributing
Thanks for contributing to this repository!
This repository follows the following conventions:
* [Semantic Versioning](https://semver.org/)
* [Keep a Changelog](https://keepachangelog.com/)
* [Conventional Commits](https://www.conventionalcommits.org/)
Development requires the Kubernetes CLI tool as well as a local Kubernetes cluster. [k3d](https://k3d.io) is recommended as a lightweight local option for standing up Kubernetes clusters.
To contribute a change:
1. Create a branch on the cloned repository
2. Make the changes in code.
3. Write tests using [cypress](https://www.cypress.io) and [Conftest](https://conftest.dev)
4. Make commits using the [Conventional Commits](https://www.conventionalcommits.org/) format. This helps with automation for changelog. Update `CHANGELOG.md` in the same commit using the [Keep a Changelog](https://keepachangelog.com). Depending on tooling maturity, this step may be automated.
5. Open a merge request using one of the provided templates. If this merge request is solving a preexisting issue, add the issue reference into the description of the MR.
6. During this time, ensure that all new commits are rebased into your branch so that it remains up to date with the `main` branch.
7. Wait for a maintainer of the repository (see CODEOWNERS) to approve.
8. If you have permissions to merge, you are responsible for merging. Otherwise, a CODEOWNER will merge the commit.
# Kiali
Istio UI, chart.
Originaly sourced from [upstream](), and minimally modified.
## Upstream Changes
## Iron Bank
You can `pull` the registry1 image(s) [here](https://registry1.dso.mil/harbor/projects/3/repositories/opensource%2Fistio-1.7%2Foperator-1.7) and view the container approval [here](https://ironbank.dso.mil/ironbank/repomap/opensource/istio-1.7).
\ No newline at end of file
apiVersion: v2
name: kiali-operator
description: Kiali is an open source project for service mesh observability, refer to https://www.kiali.io for details.
version: 1.28.0-bb.0
appVersion: 1.28.0
home: https://github.com/kiali/kiali-operator
maintainers:
- name: Kiali
email: kiali-users@googlegroups.com
url: https://kiali.io
keywords:
- istio
- kiali
- operator
sources:
- https://github.com/kiali/kiali
- https://github.com/kiali/kiali-ui
- https://github.com/kiali/kiali-operator
- https://github.com/kiali/helm-charts
icon: https://raw.githubusercontent.com/kiali/kiali.io/master/themes/kiali/static/img/kiali_logo_masthead.png
apiVersion: kpt.dev/v1alpha1
kind: Kptfile
metadata:
name: kiali-operator
upstream:
type: git
git:
commit: 850b7287d1bd38efb59674b6c06fe57b7f5796cf
repo: git@github.com:kiali/helm-charts
directory: /kiali-operator
ref: v1.28.0
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: monitoringdashboards.monitoring.kiali.io
spec:
group: monitoring.kiali.io
names:
kind: MonitoringDashboard
listKind: MonitoringDashboardList
plural: monitoringdashboards
singular: monitoringdashboard
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
...
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: kialis.kiali.io
spec:
group: kiali.io
names:
kind: Kiali
listKind: KialiList
plural: kialis
singular: kiali
scope: Namespaced
subresources:
status: {}
versions:
- name: v1alpha1
served: true
storage: true
...
Welcome to Kiali! For more details on Kiali, see: https://kiali.io
The Kiali Operator [{{ .Chart.AppVersion }}] has been installed in namespace [{{ .Release.Namespace }}]. It will be ready soon.
{{- if .Values.cr.create }}
{{- if or (and (not .Values.watchNamespace) (not .Values.cr.namespace)) (and (.Values.watchNamespace) (eq .Values.watchNamespace .Release.Namespace)) (and (.Values.cr.namespace) (eq .Values.cr.namespace .Release.Namespace)) }}
You have elected to install a Kiali CR in the same namespace as the operator [{{ .Release.Namespace }}]. You should be able to access Kiali soon.
================================
PLEASE READ THIS WARNING NOTICE:
Because the Kiali CR lives in the same namespace as the operator, DO NOT uninstall the operator or delete the operator namespace without first removing the Kiali CR. If you do not follow this advice then the Kiali Operator deletion will hang indefinitely until you remove the finalizer from the Kiali CR, and then you may find your Kubernetes environment still has Kiali Server remnants left behind.
================================
{{- else if .Values.watchNamespace }}
You have elected to install a Kiali CR in the operator watch namespace [{{ .Values.watchNamespace }}]. You should be able to access Kiali soon.
{{- else if .Values.cr.namespace }}
You have elected to install a Kiali CR in the namespace [{{ .Values.cr.namespace }}]. You should be able to access Kiali soon.
{{- else }}
You have elected to install a Kiali CR. You should be able to access Kiali soon.
{{- end }}
{{- else }}
{{- if (not .Values.watchNamespace) }}
You have elected not to install a Kiali CR. You must first install a Kiali CR before you can access Kiali. The operator is watching all namespaces, so you can create the Kiali CR anywhere.
{{- else }}
You have elected not to install a Kiali CR. You must first install a Kiali CR in the operator watch namespace [{{ .Values.watchNamespace }}] before you can access Kiali.
{{- end }}
{{- end }}
If you ever want to uninstall the Kiali Operator, remember to delete the Kiali CR first before uninstalling the operator to give the operator a chance to uninstall and remove all the Kiali Server resources.
(Helm: Chart=[{{ .Chart.Name }}], Release=[{{ .Release.Name }}], Version=[{{ .Chart.Version }}])
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kiali-operator.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 "kiali-operator.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 "kiali-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "kiali-operator.labels" -}}
helm.sh/chart: {{ include "kiali-operator.chart" . }}
app: {{ include "kiali-operator.name" . }}
{{ include "kiali-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: "kiali-operator"
{{- end }}
{{/*
Selector labels
*/}}
{{- define "kiali-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kiali-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: kiali
namespace: {{ .Release.Namespace }}
spec:
hosts:
- "{{ .Values.cr.spec.server.address }}"
gateways:
- main.{{ .Release.Namespace }}.svc.cluster.local
http:
- route:
- destination:
port:
number: {{ .Values.cr.spec.server.port | default "20001" }}
host: kiali.{{ .Release.Namespace }}.svc.cluster.local
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "kiali-operator.fullname" . }}
labels:
{{- include "kiali-operator.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources:
- configmaps
- endpoints
- events
- persistentvolumeclaims
- pods
- serviceaccounts
- services
- services/finalizers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: [""]
resources:
- namespaces
verbs:
- get
- list
- patch
- apiGroups: [""]
resources:
- secrets
verbs:
- create
- list
- watch
- apiGroups: [""]
resourceNames:
- kiali-signing-key
resources:
- secrets
verbs:
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["apps"]
resources:
- deployments
- replicasets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["monitoring.coreos.com"]
resources:
- servicemonitors
verbs:
- create
- get
- apiGroups: ["apps"]
resourceNames:
- kiali-operator
resources:
- deployments/finalizers
verbs:
- update
- apiGroups: ["kiali.io"]
resources:
- '*'
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["rbac.authorization.k8s.io"]
resources:
{{- if or (and (.Values.cr.create) (has "**" .Values.cr.spec.deployment.accessible_namespaces)) (.Values.clusterRoleCreator) }}
- clusterrolebindings
- clusterroles
{{- end }}
- rolebindings
- roles
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["apiextensions.k8s.io"]
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
- apiGroups: ["networking.k8s.io"]
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["route.openshift.io"]
resources:
- routes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["oauth.openshift.io"]
resources:
- oauthclients
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["config.openshift.io"]
resources:
- clusteroperators
verbs:
- list
- watch
- apiGroups: ["config.openshift.io"]
resourceNames:
- kube-apiserver
resources:
- clusteroperators
verbs:
- get
- apiGroups: ["console.openshift.io"]
resources:
- consolelinks
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["monitoring.kiali.io"]
resources:
- monitoringdashboards
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
# The permissions below are for Kiali itself; operator needs these so it can escalate when creating Kiali's roles
- apiGroups: [""]
resources:
- configmaps
- endpoints
- namespaces
- nodes
- pods
- pods/log
- pods/proxy
- replicationcontrollers
- services
verbs:
- get
- list
- watch
{{- if eq .Values.onlyViewOnlyMode false }}
- patch
{{- end }}
- apiGroups: [""]
resources:
- pods/portforward
verbs:
- create
- post
- apiGroups: ["extensions", "apps"]
resources:
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
{{- if eq .Values.onlyViewOnlyMode false }}
- patch
{{- end }}
- apiGroups: ["autoscaling"]
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups: ["batch"]
resources:
- cronjobs
- jobs
verbs:
- get
- list
- watch
{{- if eq .Values.onlyViewOnlyMode false }}
- patch
{{- end }}
- apiGroups:
- networking.istio.io
- security.istio.io
resources: ["*"]
verbs:
- get
- list
- watch
{{- if eq .Values.onlyViewOnlyMode false }}
- create
- delete
- patch
{{- end }}
- apiGroups: ["apps.openshift.io"]
resources:
- deploymentconfigs
verbs:
- get
- list
- watch
{{- if eq .Values.onlyViewOnlyMode false }}
- patch
{{- end }}
- apiGroups: ["project.openshift.io"]
resources:
- projects
verbs:
- get
- apiGroups: ["route.openshift.io"]
resources:
- routes
verbs:
- get
- apiGroups: ["monitoring.kiali.io"]
resources:
- monitoringdashboards
verbs:
- get
- list
- apiGroups: ["iter8.tools"]
resources:
- experiments
verbs:
- get
- list
- watch
{{- if eq .Values.onlyViewOnlyMode false }}
- create
- delete
- patch
{{- end }}
...
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "kiali-operator.fullname" . }}
labels:
{{- include "kiali-operator.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "kiali-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ include "kiali-operator.fullname" . }}
apiGroup: rbac.authorization.k8s.io
...
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kiali-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kiali-operator.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "kiali-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
name: {{ include "kiali-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
# required for the operator SDK metric service selector
name: {{ include "kiali-operator.fullname" . }}
{{- include "kiali-operator.labels" . | nindent 8 }}
annotations:
prometheus.io/scrape: {{ .Values.metrics.enabled | quote }}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "kiali-operator.fullname" . }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
containers:
- name: operator
image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default "Always" }}
args:
- "--zap-level=info"
volumeMounts:
- mountPath: /tmp/ansible-operator/runner
name: runner
env:
- name: WATCH_NAMESPACE
value: {{ .Values.watchNamespace | default "\"\"" }}
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: {{ include "kiali-operator.fullname" . }}
- name: ANSIBLE_DEBUG_LOGS
value: {{ .Values.debug.enabled | quote }}
- name: ANSIBLE_VERBOSITY_KIALI_KIALI_IO
value: {{ .Values.debug.verbosity | quote }}
- name: ANSIBLE_CONFIG
{{- if .Values.debug.enableProfiler }}
value: "/opt/ansible/ansible-profiler.cfg"
{{- else }}
value: "/etc/ansible/ansible.cfg"
{{- end }}
{{- if .Values.env }}
{{- toYaml .Values.env | nindent 8 }}
{{- end }}
ports:
- name: http-metrics
containerPort: 8383
- name: cr-metrics
containerPort: 8686
{{- if .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
{{- end }}
volumes:
- name: runner
emptyDir: {}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
...
{{ if .Values.cr.create }}
---
apiVersion: kiali.io/v1alpha1
kind: Kiali
metadata:
{{- if .Values.watchNamespace }}
namespace: {{ .Values.watchNamespace }}
{{- else if .Values.cr.namespace }}
namespace: {{ .Values.cr.namespace }}
{{- end }}
name: {{ .Values.cr.name }}
labels:
{{- include "kiali-operator.labels" . | nindent 4 }}
annotations:
ansible.operator-sdk/verbosity: {{ .Values.debug.verbosity | quote }}
spec:
{{- toYaml .Values.cr.spec | nindent 2 }}
...
{{ end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kiali-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kiali-operator.labels" . | nindent 4 }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
...
This diff is collapsed.
istio:
enabled: false
createNamespace: false
imagePullSecrets:
- name: private-registry-mil
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment