-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
gcp: use GCP Image published by RHCOS instead of creating per cluster #3808
gcp: use GCP Image published by RHCOS instead of creating per cluster #3808
Conversation
/test e2e-gcp |
RHCOS images are not yet accessible, see coreos/coreos-assembler#1561 |
480b639
to
b25cced
Compare
/test e2e-gcp |
b25cced
to
47cfdd7
Compare
/test e2e-gcp |
The rhcos.json contains the GCP image project name and resource name. Based on instance.insert api https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert the source image for instance can use of the form `projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD` where the image is in `debian-cloud` project. So this updates the rhcos.GCP to return the sourceImage in the form of `projects/<project name>/global/images/<image name>` Since we still need to create GCP images in cases like where licenses are provided, we still need to link to GCS bucket with raw image. So this adds a rhcos.GCPRaw function to return that URL.
The machines will use the osImage as is for re-using the RHCOS published images. But for cases where the licenses are set for platform, the installer will have to create a new GCP image using the raw image. Therefore set the image for machines when platform.Licenses is provided to `<cluster-id>-rhcos-image` to match the name of the image that will be created later on.
47cfdd7
to
2a73b9e
Compare
/test e2e-gcp |
/assign @jstuever |
Tf templates are provided with `gcp_image_uri` which is the location of the raw image, and `gcp_image` which is the gcp image sources from one of the master machine objects. Tf templates always use the `gcp_image` which is a pre-existing image published by RHCOS, but in cases like where the Licenses are set for the GCP platform we will create a new image using the uri.
2a73b9e
to
1f2d071
Compare
/test e2e-gcp |
/lgtm |
I think we are now publishing the RHCOS GCP images with nested virt enabled by default since coreos/coreos-assembler#1477 - hm, well let me double check. But I think we should, so after this there's no reason for the installer to handle licenses at all (and in retrospect...sorry, I guess all that work wasn't necessary, but we have had multiple personality disorder around public images in clouds). |
Personally I would not have added the use existing image support if GCP wasn't changing the API quota to force one image per 10mins... Also we have licenses support now so take backsies.. ;p /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Per comment from a GCP engineer, this is basically saying our OS supports KVM, which it does. We're enabling this only in the FCOS pipeline right now but it makes sense to enable for RHCOS too. See openshift/installer#3808
coreos/coreos-assembler#1618 so this should be in the next 4.6 build. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/test e2e-aws |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/override ci/prow/e2e-aws-upgrade |
@abhinavdahiya: Overrode contexts on behalf of abhinavdahiya: ci/prow/e2e-aws-upgrade In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@abhinavdahiya: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
Per comment from a GCP engineer, this is basically saying our OS supports KVM, which it does. We're enabling this only in the FCOS pipeline right now but it makes sense to enable for RHCOS too. See openshift/installer#3808
This openshift/installer#3808 changed the expectation for the GCP default image. It reuses now published RHCOS images, projects/rhcos-cloud/global/images/*
This openshift/installer#3808 changed the expectation for the GCP default image. It reuses now published RHCOS images, projects/rhcos-cloud/global/images/*
This openshift/installer#3808 changed the expectation for the GCP default image. It reuses now published RHCOS images, projects/rhcos-cloud/global/images/*
pkg/rhcos: allow fetching GCP image and url from metadata
The rhcos.json contains the GCP image project name and resource name.
Based on instance.insert api https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert the source image
for instance can use of the form
projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
where the image is indebian-cloud
project.
So this updates the rhcos.GCP to return the sourceImage in the form of
projects/<project name>/global/images/<image name>
Since we still need to create GCP images in cases like where licenses are provided, we still need to link to GCS bucket with raw image.
So this adds a rhcos.GCPRaw function to return that URL.
machines/gcp: use GCP image when licenses are not required
The machines will use the osImage as is for re-using the RHCOS published images. But for
cases where the licenses are set for platform, the installer will have to create a new GCP image
using the raw image. Therefore set the image for machines when platform.Licenses is provided to
<cluster-id>-rhcos-image
to match the name of the image that will be created later on.
gcp: only create new image when licenses are specified
Tf templates are provided with
gcp_image_uri
which is the location of the raw image, andgcp_image
which is the gcp image sources from one of the master machine objects.Tf templates always use the
gcp_image
which is a pre-existing image published by RHCOS, butin cases like where the Licenses are set for the GCP platform we will create a new image using the uri.