Skip to content

Commit

Permalink
Merge pull request #3377 from sjenning/set-runtime-config
Browse files Browse the repository at this point in the history
OCPBUGS-26232: set KAS runtime-config in alignment with feature gates
  • Loading branch information
openshift-merge-bot[bot] committed Jan 8, 2024
2 parents 8bd5b20 + fb1aa3c commit 90cd1cc
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -219,6 +219,16 @@ func generateConfig(p KubeAPIServerConfigParams, version semver.Version) *kcpv1.
args.Set("requestheader-extra-headers-prefix", "X-Remote-Extra-")
args.Set("requestheader-group-headers", "X-Remote-Group")
args.Set("requestheader-username-headers", "X-Remote-User")
runtimeConfig := []string{}
for _, gate := range p.FeatureGates {
if gate == "ValidatingAdmissionPolicy=true" {
runtimeConfig = append(runtimeConfig, "admissionregistration.k8s.io/v1beta1=true")
}
if gate == "DynamicResourceAllocation=true" {
runtimeConfig = append(runtimeConfig, "resource.k8s.io/v1alpha2=true")
}
}
args.Set("runtime-config", runtimeConfig...)
args.Set("service-account-issuer", p.ServiceAccountIssuerURL)
args.Set("service-account-jwks-uri", jwksURL(p.ServiceAccountIssuerURL))
args.Set("service-account-lookup", "true")
Expand Down

0 comments on commit 90cd1cc

Please sign in to comment.