Skip to content
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

build and release ossmc plugin at end of sprint #6706

Closed
jmazzitelli opened this issue Oct 11, 2023 · 4 comments · Fixed by kiali/openshift-servicemesh-plugin#213
Closed
Assignees
Labels
enhancement This is the preferred way to describe new end-to-end features.

Comments

@jmazzitelli
Copy link
Collaborator

jmazzitelli commented Oct 11, 2023

Because the Kiali operator will soon be able to install OSSMC , we need to add the plugin to the list of things built at the end of the sprint (so we want to release the latest plugin with the lastest kiali server and latest kiali operator at the time we build our sprint releases). This means we need to update our GitHub Action workflows so the the plugin is built along with the server and operator. For details on the releasing kiali, see RELEASING.md

It should work the same way we build the server image. Build the multi-arch image and push the image to quay. Ideally, the image tag will be the same version as the kiali server and operator (e.g. v1.78.0). If the plugin version numbers will NOT track the version of the operator, we will need to do some custom work in the operator because currently the operator default is to install the same image version as the operator's own version.

see https://issues.redhat.com/browse/OSSM-4944

PRs:

@jmazzitelli jmazzitelli added the enhancement This is the preferred way to describe new end-to-end features. label Oct 11, 2023
@jmazzitelli
Copy link
Collaborator Author

Here is the plugin release workflow - https://github.com/kiali/openshift-servicemesh-plugin/blob/main/.github/workflows/release.yaml

Note that once the operator is removed from the plugin repo (see kiali/openshift-servicemesh-plugin#211) the only thing that release workflow will be doing is building the plugin image and pushing the plugin image to quay.

@jshaughn
Copy link
Collaborator

Is there a way for the console/plugin user to know which version of the plugin they are using, along with the version of Kiali etc? Basically the ABout box for the plugin? Also wondering if the plugin should be versioned the same as Kiali, and not independently. The plugin is basically alternate "ui"and should match the server version.

@jmazzitelli
Copy link
Collaborator Author

jmazzitelli commented Oct 13, 2023

kubectl get ossmconsole <name> -n <namespace> -o yaml

The status field will show the version of Kiali that the plugin detected. The app.kubernetes.io/version label tells you the plugin version (the version of the image technically).

There is also a page in the OS console that shows version of the plugin.

I'll install everything again and document these in more detail.

@jmazzitelli
Copy link
Collaborator Author

jmazzitelli commented Oct 13, 2023

wondering if the plugin should be versioned the same as Kiali, and not independently. The plugin is basically alternate "ui"and should match the server version.

In my PRs, I actually do that. I moved the plugin version to match that of the kiali version - see the Makefile change in the PR https://github.com/kiali/openshift-servicemesh-plugin/pull/211/files where it now has:

# Identifies the current build. Match the same version of Kiali Server and Operator.
VERSION ?= v1.76.0-SNAPSHOT

Is there a way for the console/plugin user to know which version of the plugin they are using, along with the version of Kiali etc? Basically the ABout box for the plugin?

This is what the OpenShift Console itself provides. You first go to the OpenShift lefthand nav and select "Administration>Cluster Settings". Then on the right side select "Configuration" tab. From there select the item "Console (operator.openshift.io"). On the resulting page, select the "Console plugins" tag and you will see the version info of the plugin itself). The end result is going to this URL https://<os-console-hostname>/k8s/cluster/operator.openshift.io~v1~Console/cluster/console-plugins in the OS Console, which results in this page being displayed:

image

You can obtain the version of the plugin using the "oc" CLI and getting the version label off the plugin pod. You do this via:

NAMESPACE="$(oc get ossmconsole --all-namespaces -o jsonpath={..metadata.namespace})"
PODNAME="$(oc get pods -n $NAMESPACE -l app.kubernetes.io/name=ossmconsole -o name)"
oc get $PODNAME -n $NAMESPACE -o jsonpath='{.metadata.labels.app\.kubernetes\.io/version}{"\n"}'

To get the version of the Kiali Server that the plugin is using, you can see that information in the status field of the OSSMConsole CR - specifically the status.environment.kialiVersion field. You can get this from the "oc" CLI running this command:

oc get ossmconsole --all-namespaces -o jsonpath='{..status.environment.kialiVersion}{"\n"}'

The result will be the actual Kiali Server version:

$ oc get ossmconsole --all-namespaces -o jsonpath='{..status.environment.kialiVersion}{"\n"}'
v1.76.0-SNAPSHOT

So, in short, we could provide this small script (or at least document these commands) to get the plugin version and the kiali version (for the kiali that the plugin is using):

CR_NAME="$(oc get ossmconsole --all-namespaces -o jsonpath={..metadata.name})"
CR_NAMESPACE="$(oc get ossmconsole --all-namespaces -o jsonpath={..metadata.namespace})"
PODNAME="$(oc get pods -n $CR_NAMESPACE -l app.kubernetes.io/name=ossmconsole -o name)"
echo "Plugin version =" $(oc get $PODNAME -n $CR_NAMESPACE -o jsonpath='{.metadata.labels.app\.kubernetes\.io/version}{"\n"}')
echo "Kiali version =" $(oc get $CR_NAME -n $CR_NAMESPACE -o jsonpath='{..status.environment.kialiVersion}{"\n"}')

jmazzitelli added a commit to jmazzitelli/openshift-servicemesh-plugin that referenced this issue Oct 17, 2023
jmazzitelli added a commit to jmazzitelli/kiali that referenced this issue Oct 17, 2023
@jmazzitelli jmazzitelli self-assigned this Oct 17, 2023
jmazzitelli added a commit that referenced this issue Oct 17, 2023
jmazzitelli added a commit to kiali/openshift-servicemesh-plugin that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is the preferred way to describe new end-to-end features.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants