-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add conversion v1 v2 #423
Add conversion v1 v2 #423
Conversation
ba415d4
to
d019b25
Compare
364c0eb
to
8119bc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suspect since this a large change, this would need a good amount of testing.
Not sure what is the tentative date we should think for a new release?
@harshavardhana agree, testing is needed, I've been doing it myself, and the one that is the most important is testing that a user of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plugin doesn't start with this image
kubectl minio init -i nitishtiwari/operator:v1v2
2021/01/21 18:10:27 common.go:97: file does not exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed these steps:
- Deploy v3.0.29 Operator
- Create a tenant
- Patch the operator pod with new image based on this PR with this command
kubectl patch pod minio-operator-6f5b8cdcff-vkjj7 --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"nitishtiwari/operator:v1v2"}]'
- Create a fresh tenant --> Fails
- Upgrade the existing tenant to a new image --> Fails
@nitisht I just fixed it in my latest commit, can you try your steps again? |
To test: 1.- Install an older Operator
Now wait for the tenant to be ready
3.- Create a tenant that uses zones with apiVersion The previous tenant and the new tenants, all should work cc @harshavardhana @nitisht @Alevsk |
I am getting this error for apiVersion
|
With
|
Tested, worked for me using latest code in thus branch |
Yes, working for me as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, basic functionality tested, seems to work fine.
What is the process (if any) for updating a tenant on the v1 API to v2? |
@ravindk89 the idea is that it will magically work, if you have the tenant v1 from |
@dvaldivia good to know. Is this something the user needs to check the status on? I'd like to provide simple commands for checking the API status of a tenant after upgrading the operator. |
This is hitting us really hard kubernetes-sigs/controller-tools#448 |
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
I created a tenant using operator v3.0.28:
|
creating a second tenant with latest console with deps fixed causes:
Seems crd is still specting zones. That is a response from kubernetes. @dvaldivia ^ |
78aeebc
to
0ce833e
Compare
required: | ||
- spec | ||
type: object | ||
served: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add the v1 deprecation warning like this https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#version-deprecation
# This indicates the v1alpha1 version of the custom resource is deprecated.
# API requests to this version receive a warning header in the server response.
deprecated: true
# This overrides the default warning returned to API clients making v1alpha1 API requests.
deprecationWarning: "example.com/v1alpha1 CronTab is deprecated; see http://example.com/v1alpha1-v1 for instructions to migrate to example.com/v1 CronTab"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I'll look into adding the deprecated fields, I can see it's not supported by controller-gen
so I'll need to patch it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, also sent a PR to controller-gen
kubernetes-sigs/controller-tools#541
|
||
// Console Related Constants | ||
|
||
// DefaultConsoleImage specifies the latest Console Docker hub image | ||
const DefaultConsoleImage = "minio/console:v0.4.6" | ||
const DefaultConsoleImage = "minio/console:v0.3.14" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not fixed yet
Old tenant (v1) that gets migrated to v2 never gets to running state - since the operator is expecting a new statefulset name but the statefulset name in the tenant remains the same. Pods no longer have resolvable names.
|
@nitisht just fixed the issue you ran into |
error with tenant created using console
yaml:
Also during this it killed one pod and started failing searching for a secret eventhough tls is disabled for that tenant.
|
why are we still using console v0.4.3 ? @cesnietor |
Squashed and merged to master 7e532e6 |
Bumps the recent changes to Tenant to
v2
api version, and introduces a conversion webhook so that the k8s API can convert between the versions and keep compatibility.Updates all code to work with v2 by default.