-
Notifications
You must be signed in to change notification settings - Fork 175
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
Release 4.8.10 #1703
Release 4.8.10 #1703
Conversation
8d574c4
to
06a9ee2
Compare
4dc6416
to
4375e77
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 recommend reviewing this commit-by-commit. I moved vendoring and generation of assets into separate commits.
I left few comments below which explain why we need some of ARO-RP changes.
// VHD fetches the URL of the public Azure blob containing the RHCOS image | ||
func VHD(ctx context.Context, arch types.Architecture) (string, error) { | ||
archName := coreosarch.RpmArch(string(arch)) | ||
st, err := rhcospkg.FetchCoreOSBuild(ctx) | ||
if err != nil { | ||
return "", err | ||
} | ||
streamArch, err := st.GetArchitecture(archName) | ||
if err != nil { | ||
return "", err | ||
} | ||
ext := streamArch.RHELCoreOSExtensions | ||
if ext == nil { | ||
return "", fmt.Errorf("%s: No azure build found", st.FormatPrefix(archName)) | ||
} | ||
azd := ext.AzureDisk | ||
if azd == nil { | ||
return "", fmt.Errorf("%s: No azure build found", st.FormatPrefix(archName)) | ||
} | ||
|
||
return azd.URL, nil | ||
} |
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.
New code due to openshift/installer#4582
// Image returns an image object containing VM image SKU information. | ||
func Image(ctx context.Context) (*azuretypes.Image, error) { | ||
osImage, err := VHD(ctx, types.ArchitectureAMD64) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
m := rxRHCOS.FindStringSubmatch(osImage) | ||
if m == nil { | ||
return nil, fmt.Errorf("couldn't match osImage %q", osImage) | ||
} | ||
|
||
return &azuretypes.Image{ | ||
Publisher: "azureopenshift", | ||
Offer: "aro4", | ||
SKU: "aro_" + m[2], // "aro_4x" | ||
Version: m[1], // "4x.yy.2020zzzz" | ||
}, nil | ||
} |
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 previously was called getRHCOSImage
in pkg/cluster/generateconfig.go
.
go mod edit -replace github.com/metal3-io/cluster-api-provider-baremetal=$(go list -mod=mod -m github.com/openshift/cluster-api-provider-baremetal@release-4.7 | sed -e 's/ /@/') | ||
# We use release-4.8 here so we can use new version of sigs.k8s.io/controller-runtime sooner. | ||
go mod edit -replace github.com/metal3-io/baremetal-operator=$(go list -mod=mod -m github.com/openshift/baremetal-operator@release-4.8 | sed -e 's/ /@/') |
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.
These package are now pinned to a specific version (at leat for now). See in go.mod
:
github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a // Use OpenShift fork
github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a // Use OpenShift fork
github.com/metal3-io/cluster-api-provider-baremetal => github.com/openshift/cluster-api-provider-baremetal v0.0.0-20210721192732-726d97e15db7 // Pin OpenShift fork
We pin them to specific commits and I think these commits are from master. It was huge pain to make these two work (and we don't even need them). So it doesn't really matter.
@@ -107,7 +107,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl. | |||
GracePeriodSeconds: -1, | |||
IgnoreAllDaemonSets: true, | |||
Timeout: 60 * time.Second, | |||
DeleteLocalData: true, | |||
DeleteEmptyDirData: 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.
This is due to kubernetes/kubernetes#95076
@@ -31,14 +32,14 @@ func NewResult(m metrics.Interface) kmetrics.ResultMetric { | |||
} | |||
} | |||
|
|||
func (t *tracer) Observe(verb string, url url.URL, latency time.Duration) { | |||
func (t *tracer) Observe(ctx context.Context, verb string, url url.URL, latency time.Duration) { |
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.
Interface change in k8s.io/client-go/tools/metrics
. Same as below.
@@ -81,6 +81,7 @@ func TestMerge(t *testing.T) { | |||
"openshift.io/sa.scc.supplemental-groups": "groups", | |||
"openshift.io/sa.scc.uid-range": "uids", | |||
}, | |||
Labels: map[string]string{"kubernetes.io/metadata.name": "test"}, |
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.
NamespaceDefaultLabelName
feature gate is enabled by default in Kubernetes 1.21: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
@@ -142,6 +141,7 @@ func (m *manager) generateInstallConfig(ctx context.Context) (*installconfig.Ins | |||
EncryptionAtHost: m.doc.OpenShiftCluster.Properties.MasterProfile.EncryptionAtHost == api.EncryptionAtHostEnabled, | |||
OSDisk: azuretypes.OSDisk{ | |||
DiskEncryptionSetID: m.doc.OpenShiftCluster.Properties.MasterProfile.DiskEncryptionSetID, | |||
DiskSizeGB: 1024, |
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.
openshift/installer#4666 breakes our code: we were relying on defaults set here and the fact that installer was mutating the isntallconfig object:
But these defaults are not longer propogated to the installer config becuase this:
changed to this in 4.8:
Fixed it by adding default value to our pkg/cluster/generateconfig.go
.
Updates the codebase to allow vendoring of OCP 4.8
4375e77
to
b4b4fd2
Compare
@@ -34,11 +35,11 @@ func NewMetrics(log *logrus.Entry, m metrics.Interface) (Runnable, error) { | |||
r: prometheus.NewRegistry(), | |||
} | |||
|
|||
if err := g.r.Register(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{})); err != nil { | |||
if err := g.r.Register(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{})); err != nil { |
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.
github.com/prometheus/client_golang/prometheus
got updated and prometheus.NewProcessCollector
while still exists - it is depricated. Our golangci-lint
job complains about it.
overall looks good! :) |
Previous e2e run failed, but it looked like a flake. Waiting for another e2e run, but I think this is ready for review now. |
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.
Looks good thanks for detailed explanation with links etc.. in comments. Much easier to understand with that information available.
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 | |||
kind: CustomResourceDefinition | |||
metadata: | |||
annotations: | |||
controller-gen.kubebuilder.io/version: v0.5.0 | |||
controller-gen.kubebuilder.io/version: v0.6.2 |
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.
sorry for my ignorance, where does this version come from?
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.
@bryanro92 Good question. I should've explained it too as it is not obvious.
We generate this yaml using controller-gen
which is part of sigs.k8s.io/controller-tools
. It got updated from v0.5.0
to v0.6.2
and as a result on make generate
this yaml got updated too.
You can see version change of sigs.k8s.io/controller-tools
in go.mod
.
b4b4fd2
to
319fa70
Compare
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
Which issue this PR addresses:
Work Item №10405746.
What this PR does / why we need it:
Brings installer 4.8 into the RP.
Test plan for issue:
Is there any documentation that needs to be updated for this PR?
No. User facing communications are being handled separately.