Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

[WIP] Use oc create in fuse managed instead of apply #508

Closed

Conversation

aidenkeating
Copy link
Contributor

@aidenkeating aidenkeating commented Mar 27, 2019

Currently, we are using oc apply in many places in the Fuse
Managed installation. This causes issues when running the installation
over an existing installation as oc apply will update the existing
resources.

This change changes these places to oc create with a check that will
not fail if the resource already exists.

This change also includes an update to the Fuse Managed checks to see
if all Pods are up. Instead of referencing a label and specifying an
exact number of Pods, this will now specify a minimum amount of Pods
that should exist in the namespace before continuing.

Verification:

  • Run the installer
  • Ensure it completes successfully
    • Ensure the console can be accessed by any two users in the
      cluster, to verify the OAuth proxy rules are still correct
  • Run the installer again, with the Fuse Managed namespace now
    there
  • Ensure it completes successfully, again

Resolves #402


- name: Verify Fuse deployment succeeded
shell: oc get pods -n {{ fuse_namespace }} --selector="app=syndesis" -o jsonpath='{.items[*].status.containerStatuses[?(@.ready==true)].ready}' | wc -w
shell: oc get pods -n openshift-fuse -o jsonpath='{.items[*].status.containerStatuses[?(@.ready==true)].ready}' | wc -w | tr -d ' '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going for {{ns_prefix}}{{ fuse_namespace }} here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sedroche {{ fuse_namespace }} should be enough here as the ns_prefix will be set in defaults.yml of this role. I've removed the mistakenly hardcoded namespaces though in 0d56914.

Currently, we are using `oc apply` in many places in the Fuse
Managed installation. This causes issues when running the installation
over an existing installation as `oc apply` will update the existing
resources.

This change changes these places to `oc create` with a check that will
not fail if the resource already exists.

This change also includes an update to the Fuse Managed checks to see
if all Pods are up. Instead of referencing a label and specifying an
exact number of Pods, this will now specify a minimum amount of Pods
that should exist in the namespace before continuing.

Verification:
- Run the installer
- Ensure it completes successfully
  - Ensure the console can be accessed by any two users in the
    cluster, to verify the OAuth proxy rules are still correct
- Run the installer again, with the Fuse Managed namespace now
there
- Ensure it completes successfully, again
@mikenairn
Copy link
Member

@aidenkeating Update and re-open if this is still valid.

@mikenairn mikenairn closed this Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fuse install happens for every run/re-run of the installer
3 participants