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

report token fallback: basicAuth for kubeVersion lt 1.20.0 #133

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dacleyra
Copy link
Contributor

Use basicAuth and don't use TokenRequestProject until it is GA in kubeVersion 1.20.0+
https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/

@dacleyra dacleyra requested a review from zach-source February 11, 2021 14:26
@zach-source zach-source changed the title basicAuth for kubeVersion lt 1.20.0 report token fallback: basicAuth for kubeVersion lt 1.20.0 Mar 1, 2021
@@ -583,6 +584,17 @@ func (r *MeterBaseReconciler) generateExpectedDates(endTime time.Time, loc *time
}

func (r *MeterBaseReconciler) newMeterReport(namespace string, startTime time.Time, endTime time.Time, meterReportName string, instance *marketplacev1alpha1.MeterBase, prometheusServiceName string) *marketplacev1alpha1.MeterReport {
// If kubeVersion < 1.20 TokenRequest and TokenRequestProjection are beta and not assumed available, use basicAuth (https port). Logical default if unknown kubeVersion parse failure

Choose a reason for hiding this comment

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

We'll need to rework and merge with all the rework for prometheus. Using 1.20 as a cut off point makes sense from the Feature Gate perspective but many servers have this enabled by default before 1.20.

@zach-source
Copy link

Let's look at the changes for prometheus and incorporate this with it. We'll need to find a better way to check if the feature gate is enabled or available to use outside of just version since it is an optional feature. It is a better method of authenticating. Additionally we need to expand this for our meterdef support.

@zach-source zach-source added do not merge This PR is not to be merged until this label is removed WIP work in progress - do not merge labels Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge This PR is not to be merged until this label is removed WIP work in progress - do not merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants