-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ import ( | |
"crypto/x509" | ||
"encoding/base64" | ||
"fmt" | ||
"regexp" | ||
"strings" | ||
|
||
"github.com/Azure/go-autorest/autorest/azure" | ||
|
@@ -17,7 +16,6 @@ import ( | |
icazure "github.com/openshift/installer/pkg/asset/installconfig/azure" | ||
"github.com/openshift/installer/pkg/asset/releaseimage" | ||
"github.com/openshift/installer/pkg/ipnet" | ||
"github.com/openshift/installer/pkg/rhcos" | ||
"github.com/openshift/installer/pkg/types" | ||
azuretypes "github.com/openshift/installer/pkg/types/azure" | ||
"github.com/openshift/installer/pkg/types/validation" | ||
|
@@ -27,6 +25,7 @@ import ( | |
"github.com/Azure/ARO-RP/pkg/api" | ||
"github.com/Azure/ARO-RP/pkg/util/computeskus" | ||
"github.com/Azure/ARO-RP/pkg/util/pullsecret" | ||
"github.com/Azure/ARO-RP/pkg/util/rhcos" | ||
"github.com/Azure/ARO-RP/pkg/util/stringutils" | ||
"github.com/Azure/ARO-RP/pkg/util/subnet" | ||
"github.com/Azure/ARO-RP/pkg/util/version" | ||
|
@@ -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 commentThe 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 |
||
}, | ||
}, | ||
}, | ||
|
@@ -215,7 +215,7 @@ func (m *manager) generateInstallConfig(ctx context.Context) (*installconfig.Ins | |
installConfig.Config.Publish = types.InternalPublishingStrategy | ||
} | ||
|
||
installConfig.Config.Azure.Image, err = getRHCOSImage(ctx) | ||
installConfig.Config.Azure.Image, err = rhcos.Image(ctx) | ||
if err != nil { | ||
return nil, nil, err | ||
} | ||
|
@@ -234,24 +234,3 @@ func (m *manager) generateInstallConfig(ctx context.Context) (*installconfig.Ins | |
|
||
return installConfig, image, err | ||
} | ||
|
||
var rxRHCOS = regexp.MustCompile(`rhcos-((\d+)\.\d+\.\d{8})\d{4}\-\d+-azure\.x86_64\.vhd`) | ||
|
||
func getRHCOSImage(ctx context.Context) (*azuretypes.Image, error) { | ||
osImage, err := rhcos.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 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import ( | |
"time" | ||
|
||
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/prometheus/client_golang/prometheus/collectors" | ||
"github.com/sirupsen/logrus" | ||
|
||
"github.com/Azure/ARO-RP/pkg/metrics" | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
return nil, err | ||
} | ||
|
||
if err := g.r.Register(prometheus.NewGoCollector()); err != nil { | ||
if err := g.r.Register(collectors.NewGoCollector()); err != nil { | ||
return nil, err | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ package k8s | |
// Licensed under the Apache License 2.0. | ||
|
||
import ( | ||
"context" | ||
"net/url" | ||
"time" | ||
|
||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Interface change in |
||
t.m.EmitGauge("client.k8s.duration", latency.Milliseconds(), map[string]string{ | ||
"path": url.Path, | ||
"verb": verb, | ||
}) | ||
} | ||
|
||
func (t *tracer) Increment(code string, verb string, host string) { | ||
func (t *tracer) Increment(ctx context.Context, code string, verb string, host string) { | ||
t.m.EmitGauge("client.k8s.count", 1, map[string]string{ | ||
"verb": verb, | ||
"code": code, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. This is due to kubernetes/kubernetes#95076 |
||
DisableEviction: true, | ||
OnPodDeletedOrEvicted: func(pod *corev1.Pod, usingEviction bool) { | ||
r.log.Printf("deleted pod %s/%s", pod.Namespace, pod.Name) | ||
|
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
: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.