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

feat: Add support tenant update via image available to operator #266

Merged
merged 7 commits into from
Aug 28, 2020
Merged

feat: Add support tenant update via image available to operator #266

merged 7 commits into from
Aug 28, 2020

Conversation

nitisht
Copy link
Contributor

@nitisht nitisht commented Aug 24, 2020

The update flow is

  • Operator has access to a new MinIO Docker Image.
  • Tenant admin requests an update of a certain tenant using kubectl apply.
  • Operator identifies this request and fetches the minio binary
    and other relevant files to a local directory.
  • Operator makes minio admin api call with a URL of its own webhook
    server.
  • Tenant fetches the binary and other files extracted in
    previous step and updates itself.
  • Operator deletes all temporary files after successful update.

@nitisht nitisht changed the title Add support for operator based update to tenant images feat: Add support tenant update via image available to operator Aug 25, 2020
@nitisht nitisht marked this pull request as ready for review August 25, 2020 17:10
operator-kustomize/deployment.yaml Show resolved Hide resolved
pkg/controller/cluster/main-controller.go Outdated Show resolved Hide resolved
pkg/controller/cluster/main-controller.go Outdated Show resolved Hide resolved
pkg/controller/cluster/main-controller.go Outdated Show resolved Hide resolved
pkg/controller/cluster/main-controller.go Outdated Show resolved Hide resolved
operator-kustomize/deployment.yaml Show resolved Hide resolved
pkg/controller/cluster/main-controller.go Outdated Show resolved Hide resolved
@harshavardhana
Copy link
Member

I made some more improvements

  • Avoid the strict requirement for container images to have version ID tags
  • Let the server tell us if the update is possible or not
  • Fetch the tags from the minio binary with a single container create only

@harshavardhana
Copy link
Member

nitisht and others added 6 commits August 27, 2020 12:39
The update flow is
- Operator has access to a new MinIO Docker Image.
- Admin requests an update of a certain tenant using `kubectl apply`.
- Operator identifies this request and fetches the minio binary
and other relevant files to a local directory.
- Operator makes minio admin api call with a URL of its own webhook
server.
- Tenant fetches the binary and other files extracted in
previous step and updates itself.
- Operator deletes all temporary files after successful update.
The update flow is
- Operator has access to a new MinIO Docker Image.
- Admin requests an update of a certain tenant using `kubectl apply`.
- Operator identifies this request and fetches the minio binary
and other relevant files to a local directory.
- Operator makes minio admin api call with a URL of its own webhook
server.
- Tenant fetches the binary and other files extracted in
previous step and updates itself.
- Operator deletes all temporary files after successful update.
@harshavardhana
Copy link
Member

@harshavardhana
Copy link
Member

Works for all situations @nitisht

// Correct URL could not be obtained, not proceeding to update.
return fmt.Errorf("Unable to get canonical update URL, failed with %w", err)
return fmt.Errorf("Unable to get canonical update URL for Tenant '%s', failed with %w", name, err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm seeing through all this error returns, I think maybe we should also update the status of the Tenant to indicate the Update failed for X reason

@harshavardhana
Copy link
Member

Final patch https://github.com/harshavardhana/minio-operator/commit/26e2e9612dce13d916006dba1657ecec91d2f970.patch

Please apply this with as git am -3 <patch>

harshavardhana
harshavardhana previously approved these changes Aug 28, 2020
Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

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

fully tested and working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants