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

MGMT-14923: add OSImageVersion to InfraEnvSpec #5365

Merged

Conversation

danielerez
Copy link
Contributor

@danielerez danielerez commented Jul 18, 2023

Introduced a new property to InfraEnvSpec: OSImageVersion.
The property can be used for creating an InfraEnv through kube-api with a specific OS image version.

The OSImageVersion is useful for HyperShift flows which use late binding, hence, the InfraEnv isn't created according to a cluster version (thus, the latest OS image is used as a fallback).

Notes:

  • The specified version should refer to an OSImage from the list in AgentServiceConfig, otherwise the condition is set to failure.
  • When a ClusterRef is provided, we still use the cluster's version for creating the InfraEnv. Thus, The property should not be provided along with OSImageVersion to avoid a conflict (validated with a WebHook).

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 18, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 18, 2023

@danielerez: This pull request references MGMT-14923 which is a valid jira issue.

In response to this:

Introduced a new property to InfraEnvSpec: OSImageVersion.
The property can be used for creating an InfraEnv through kube-api with a specific OS image version.

The OSImageVersion is useful for HyperShift flows which use late binding, hence, the InfraEnv isn't created according to a cluster version (thus latest OS image is used as a fallback).

Notes:

  • The specified version should refer to an OSImage from the list in AgentServiceConfig, otherwise the condition is set to failure.
  • When a ClusterRef is provided, we still use the cluster's version for creating the InfraEnv. Thus, The property should not be provided along with OSImageVersion to avoid a conflict (validated with a WebHook).

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 18, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jul 18, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 18, 2023
@danielerez
Copy link
Contributor Author

/test all

@openshift-ci openshift-ci bot added the api-review Categorizes an issue or PR as actively needing an API review. label Jul 18, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jul 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danielerez

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2023
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #5365 (666022c) into master (6fb0883) will increase coverage by 0.07%.
The diff coverage is 84.90%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5365      +/-   ##
==========================================
+ Coverage   67.59%   67.66%   +0.07%     
==========================================
  Files         226      226              
  Lines       33304    33349      +45     
==========================================
+ Hits        22511    22567      +56     
+ Misses       8759     8746      -13     
- Partials     2034     2036       +2     
Impacted Files Coverage Δ
...ks/agentinstall/v1beta1/infraenv_admission_hook.go 86.13% <75.00%> (-3.40%) ⬇️
...rnal/controller/controllers/infraenv_controller.go 67.93% <100.00%> (+4.35%) ⬆️

... and 1 file with indirect coverage changes

@filanov
Copy link
Contributor

filanov commented Jul 18, 2023

/assign @avishayt
/assign @carbonin

Copy link
Member

@carbonin carbonin left a comment

Choose a reason for hiding this comment

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

Can you also ensure there is a test for the case where the cluster is set?

@danielerez
Copy link
Contributor Author

Can you also ensure there is a test for the case where the cluster is set?

Actually didn't find something specific for this flow, added.

@carbonin
Copy link
Member

Looks good, any reason it's still in draft?

@danielerez
Copy link
Contributor Author

Looks good, any reason it's still in draft?

Not really:) Moved to ready for review.

@danielerez danielerez marked this pull request as ready for review July 19, 2023 09:35
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 19, 2023
@openshift-ci openshift-ci bot requested review from jhernand and tsorya July 19, 2023 09:35
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 19, 2023

@danielerez: This pull request references MGMT-14923 which is a valid jira issue.

In response to this:

Introduced a new property to InfraEnvSpec: OSImageVersion.
The property can be used for creating an InfraEnv through kube-api with a specific OS image version.

The OSImageVersion is useful for HyperShift flows which use late binding, hence, the InfraEnv isn't created according to a cluster version (thus, the latest OS image is used as a fallback).

Notes:

  • The specified version should refer to an OSImage from the list in AgentServiceConfig, otherwise the condition is set to failure.
  • When a ClusterRef is provided, we still use the cluster's version for creating the InfraEnv. Thus, The property should not be provided along with OSImageVersion to avoid a conflict (validated with a WebHook).

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@danielerez danielerez force-pushed the infraenvspec_osimageversion branch 2 times, most recently from f0a1e0d to 61ec6da Compare July 19, 2023 16:38
@carbonin
Copy link
Member

Looks good to me, but I'll give @avishayt a chance to 👍 the API

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2023
Introduced a new property to InfraEnvSpec: 'OSImageVersion'.
The property can be used for creating an InfraEnv through kube-api
with a specific OS image version.

The 'OSImageVersion' is useful for HyperShift flows which
use late binding, hence, the InfraEnv isn't created according
to a cluster version (thus latest OS image is used as a fallback).

Notes:
* The specified version should refer to an OSImage from the list
  in AgentServiceConfig, otherwise the condition is set to failure.
* When a ClusterRef is provided, we still use the cluster's version
  for creating the InfraEnv. Thus, The property should not be
  provided along with OSImageVersion to avoid a conflict
  (validated with a WebHook).
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jul 20, 2023

@danielerez: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/edge-e2e-ai-operator-ztp-capi 666022c link false /test edge-e2e-ai-operator-ztp-capi
ci/prow/edge-e2e-ai-operator-ztp-hypershift-zero-nodes 666022c link false /test edge-e2e-ai-operator-ztp-hypershift-zero-nodes

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.

@avishayt
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2023
@openshift-merge-robot openshift-merge-robot merged commit 36d3543 into openshift:master Jul 23, 2023
15 of 17 checks passed
CrystalChun pushed a commit to CrystalChun/assisted-service that referenced this pull request Jul 25, 2023
Introduced a new property to InfraEnvSpec: 'OSImageVersion'.
The property can be used for creating an InfraEnv through kube-api
with a specific OS image version.

The 'OSImageVersion' is useful for HyperShift flows which
use late binding, hence, the InfraEnv isn't created according
to a cluster version (thus latest OS image is used as a fallback).

Notes:
* The specified version should refer to an OSImage from the list
  in AgentServiceConfig, otherwise the condition is set to failure.
* When a ClusterRef is provided, we still use the cluster's version
  for creating the InfraEnv. Thus, The property should not be
  provided along with OSImageVersion to avoid a conflict
  (validated with a WebHook).
CrystalChun pushed a commit to CrystalChun/assisted-service that referenced this pull request Aug 25, 2023
Introduced a new property to InfraEnvSpec: 'OSImageVersion'.
The property can be used for creating an InfraEnv through kube-api
with a specific OS image version.

The 'OSImageVersion' is useful for HyperShift flows which
use late binding, hence, the InfraEnv isn't created according
to a cluster version (thus latest OS image is used as a fallback).

Notes:
* The specified version should refer to an OSImage from the list
  in AgentServiceConfig, otherwise the condition is set to failure.
* When a ClusterRef is provided, we still use the cluster's version
  for creating the InfraEnv. Thus, The property should not be
  provided along with OSImageVersion to avoid a conflict
  (validated with a WebHook).
danielerez added a commit to danielerez/assisted-service that referenced this pull request Oct 15, 2023
Introduced a new property to InfraEnvSpec: 'OSImageVersion'.
The property can be used for creating an InfraEnv through kube-api
with a specific OS image version.

The 'OSImageVersion' is useful for HyperShift flows which
use late binding, hence, the InfraEnv isn't created according
to a cluster version (thus latest OS image is used as a fallback).

Notes:
* The specified version should refer to an OSImage from the list
  in AgentServiceConfig, otherwise the condition is set to failure.
* When a ClusterRef is provided, we still use the cluster's version
  for creating the InfraEnv. Thus, The property should not be
  provided along with OSImageVersion to avoid a conflict
  (validated with a WebHook).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants