Skip to content

Commit

Permalink
provide ossmc capabilities for upstream olm metadata (#709)
Browse files Browse the repository at this point in the history
This can be useful if OpenShift users want to use the
upstream OLM metadata when installing the Kiali Operator.
fixes: kiali/kiali#6788
  • Loading branch information
jmazzitelli authored Oct 27, 2023
1 parent 526faa3 commit 2a89b58
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ metadata:
"web_root": "/mykiali"
}
}
},
{
"apiVersion": "kiali.io/v1alpha1",
"kind": "OSSMConsole",
"metadata": {
"name": "ossmconsole"
},
"spec": {
"kiali": {
"serviceName": "",
"serviceNamespace": "",
"servicePort": 0
}
}
}
]
spec:
Expand Down Expand Up @@ -73,6 +87,10 @@ spec:
'/kiali' though you can change this by configuring the 'web_root' setting in
the Kiali CR.
If on OpenShift, you can create an OSSMConsole CR to have the operator
install the OpenShift ServiceMesh Console plugin to the OpenShift Console
thus providing an interface directly integrated with the OpenShift Console.
## About this Operator
### Kiali Custom Resource Configuration Settings
Expand Down Expand Up @@ -175,6 +193,35 @@ spec:
path: server.web_root
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:label'
- name: ossmconsoles.kiali.io
group: kiali.io
description: A configuration file for a OpenShift Service Mesh Console installation.
displayName: OpenShift Service Mesh Console
kind: OSSMConsole
version: v1alpha1
resources:
- kind: Deployment
version: apps/v1
- kind: Pod
version: v1
- kind: ConfigMap
version: v1
specDescriptors:
- displayName: Kiali Service Name
description: "The internal Kiali service that the OS Console will use to proxy API calls. If empty, an attempt will be made to auto-discover it from the Kiali OpenShift Route."
path: kiali.serviceName
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:text'
- displayName: Kiali Service Namespace
description: "The namespace where the Kiali service is deployed. If empty, an attempt will be made to auto-discover it from the Kiali OpenShift Route. It will assume that the OpenShift Route and the Kiali service are deployed in the same namespace."
path: kiali.serviceNamespace
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:text'
- displayName: Kiali Service Port
description: "The internal port used by the Kiali service for the API. If empty, an attempt will be made to auto-discover it from the Kiali OpenShift Route."
path: kiali.servicePort
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:text'
apiservicedefinitions: {}
install:
strategy: deployment
Expand Down Expand Up @@ -237,6 +284,8 @@ spec:
value: "false"
- name: ALLOW_AD_HOC_KIALI_IMAGE
value: "false"
- name: ALLOW_AD_HOC_OSSMCONSOLE_IMAGE
value: "false"
- name: ALLOW_SECURITY_CONTEXT_OVERRIDE
value: "false"
- name: ALLOW_ALL_ACCESSIBLE_NAMESPACES
Expand All @@ -249,6 +298,8 @@ spec:
value: "True"
- name: ANSIBLE_VERBOSITY_KIALI_KIALI_IO
value: "1"
- name: ANSIBLE_VERBOSITY_OSSMCONSOLE_KIALI_IO
value: "1"
- name: ANSIBLE_CONFIG
value: "/etc/ansible/ansible.cfg"
ports:
Expand Down Expand Up @@ -444,6 +495,27 @@ spec:
- patch
- update
- watch
# The permissions below are for OSSMC operator capabilities
- apiGroups: ["console.openshift.io"]
resources:
- consoleplugins
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups: ["operator.openshift.io"]
resources:
- consoles
verbs:
- 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:
Expand Down
25 changes: 25 additions & 0 deletions manifests/kiali-upstream/1.76.0/manifests/ossmconsole.crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: ossmconsoles.kiali.io
labels:
app: kiali-operator
app.kubernetes.io/name: kiali-operator
spec:
group: kiali.io
names:
kind: OSSMConsole
listKind: OSSMConsoleList
plural: ossmconsoles
singular: ossmconsole
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true

0 comments on commit 2a89b58

Please sign in to comment.