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

OCPBUGS-34137, OCPBUGS-34460, OCPBUGS-34113, OCPBUGS-35462: sync upstream on release-1.30/go1.22 #287

Merged
merged 34 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7373f0c
Use k3s with containerd (#2529)
dulek Jan 30, 2024
119a3ea
CI: Fetch DevStack and k3s logs (#2527)
dulek Jan 30, 2024
73d2661
Ingress: Fix listener timeout updates (#2518)
dulek Jan 31, 2024
7f1daa8
Add support to only run selected CSI services (#2316)
NotTheEvilOne Feb 2, 2024
6eda649
[ci] Bump golangci-lint for go 1.22 (#2544)
mandre Feb 8, 2024
e87f506
cinder-csi: Adds support for managing backups (#2473) (#2480)
Sebastian-RG Feb 8, 2024
d9106b3
fix: add missing labels to resources (#2519)
cwrau Feb 20, 2024
89d264f
[octavia-ingress-controller] Add annotations to keep floating IP and/…
ccleouf66 Feb 29, 2024
7eeef2f
Pass KeyId to EncryptResponse (#2535)
GlassOfWhiskey Mar 5, 2024
c63fa7b
Improve CCM docs in dual-stack context (#2563)
dulek Mar 15, 2024
b75efdb
Update KMS API to v2 (#2561)
dulek Mar 15, 2024
d28a24b
Remove enforcement of IPv6 LB as internal (#2557)
MaysaMacedo Mar 19, 2024
ea198dd
Convert outstanding commands to cobra (#2384)
stephenfin Mar 21, 2024
3225d98
Update the release procedure (#2565)
dulek Mar 28, 2024
290e7c7
Allow changing cluster-name on existing deployments (#2552)
dulek Apr 8, 2024
dab0f06
added route section to cloud-config secret (#2570)
frittenlab Apr 12, 2024
b343c1b
[cinder-csi-plugin] define availability zone for snapshot backup (#2569)
zetaab Apr 24, 2024
59963c8
Set `--use-service-account-credentials=false` (#2572)
dulek Apr 25, 2024
6387cbb
Update Cinder and Manila CSI charts maintainers (#2583)
dulek Apr 25, 2024
b6d73d6
Bump K8s to v1.30.0 (#2581)
dulek Apr 26, 2024
7a4290e
[occm] KEP-1860: Add support for LoadBalancer ipMode (#2587)
kbudde May 7, 2024
2f186d6
Bump versions for 1.30 (#2589)
zetaab May 7, 2024
89aa2cc
[release-1.30] [occm] add a node selector support for loadbalancer se…
k8s-infra-cherrypick-robot May 28, 2024
9d810ad
CARRY: Add DOWNSTREAM_OWNERS
dulek Oct 12, 2023
21f1aec
CARRY: Add .snyk configuration file
mandre Jan 3, 2024
4efa19e
CARRY: Add images
mandre Feb 6, 2024
31fd454
CARRY: More snyk ignores
dulek Jan 29, 2024
476cd94
Remove dulek from shiftstack-team
stephenfin May 15, 2024
fde8899
UPSTREAM: <carry>: Updating ose-openstack-cloud-controller-manager-co…
EmilienM Jun 14, 2024
486cfdf
UPSTREAM: <carry>: Updating ose-openstack-cinder-csi-driver-container…
EmilienM Jun 14, 2024
ae75211
UPSTREAM: <carry>: Updating csi-driver-manila-container image to be c…
EmilienM Jun 14, 2024
7ee7d46
CARRY: Don't ignore vendor directory
EmilienM Jun 14, 2024
610d36b
CARRY: Vendoring
EmilienM Jun 14, 2024
afabd29
Merge remote-tracking branch 'openshift/master' into sync-master
EmilienM Jun 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.21-openshift-4.17
tag: rhel-9-release-golang-1.22-openshift-4.17
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
## BUILD ARGS ##
################################################################################
# This build arg allows the specification of a custom Golang image.
ARG GOLANG_IMAGE=golang:1.21.5
ARG GOLANG_IMAGE=golang:1.22.2

# The distroless image on which the CPI manager image is built.
#
# Please do not use "latest". Explicit tags should be used to provide
# deterministic builds. Follow what kubernetes uses to build
# kube-controller-manager, for example for 1.27.x:
# https://github.com/kubernetes/kubernetes/blob/release-1.27/build/common.sh#L99
ARG DISTROLESS_IMAGE=registry.k8s.io/build-image/go-runner:v2.3.1-go1.21.5-bookworm.0
ARG DISTROLESS_IMAGE=registry.k8s.io/build-image/go-runner:v2.3.1-go1.22.2-bookworm.0

# We use Alpine as the source for default CA certificates and some output
# images
Expand Down
10 changes: 6 additions & 4 deletions charts/cinder-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
apiVersion: v1
appVersion: v1.29.0
appVersion: v1.30.0
description: Cinder CSI Chart for OpenStack
name: openstack-cinder-csi
version: 2.29.0
version: 2.30.0
home: https://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
- name: brtknr
email: brtknr@bath.edu
- name: mnasiadka
email: mnasiadka@gmail.com
- name: mkjpryor
email: matt@stackhpc.com
10 changes: 6 additions & 4 deletions charts/manila-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
apiVersion: v1
appVersion: v1.29.0
appVersion: v1.30.0
description: Manila CSI Chart for OpenStack
name: openstack-manila-csi
version: 2.29.0
version: 2.30.0
home: http://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
- name: brtknr
email: brtknr@bath.edu
- name: mnasiadka
email: mnasiadka@gmail.com
- name: mkjpryor
email: matt@stackhpc.com
10 changes: 7 additions & 3 deletions charts/openstack-cloud-controller-manager/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
apiVersion: v1
appVersion: v1.29.0
apiVersion: v2
appVersion: v1.30.0
description: Openstack Cloud Controller Manager Helm Chart
icon: https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-images-prod/openstack-logo/OpenStack-Logo-Vertical.png
home: https://github.com/kubernetes/cloud-provider-openstack
name: openstack-cloud-controller-manager
version: 2.29.0
version: 2.30.0
maintainers:
- name: eumel8
email: f.kloeker@telekom.de
url: https://www.telekom.com
dependencies:
- name: common
version: 2.14.1
repository: https://charts.bitnami.com/bitnami
19 changes: 5 additions & 14 deletions charts/openstack-cloud-controller-manager/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels and app labels
*/}}
{{- define "occm.labels" -}}
app.kubernetes.io/name: {{ include "occm.name" . }}
helm.sh/chart: {{ include "occm.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{- define "occm.common.matchLabels" -}}
app: {{ template "occm.name" . }}
release: {{ .Release.Name }}
Expand Down Expand Up @@ -73,8 +60,12 @@ Create cloud-config makro.
{{- range $key, $value := .Values.cloudConfig.metadata }}
{{ $key }} = {{ $value | quote }}
{{- end }}
{{- end }}

[Route]
{{- range $key, $value := .Values.cloudConfig.route }}
{{ $key }} = {{ $value | quote }}
{{- end }}
{{- end }}

{{/*
Generate string of enabled controllers. Might have a trailing comma (,) which needs to be trimmed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Values.clusterRoleName }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:{{ include "occm.name" . }}:auth-delegate
labels: {{- include "common.labels.standard" . | nindent 4 }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Values.clusterRoleName }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "occm.name" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "occm.labels" . | nindent 4 }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -55,7 +54,7 @@ spec:
- --cloud-config=$(CLOUD_CONFIG)
- --cluster-name=$(CLUSTER_NAME)
- --cloud-provider=openstack
- --use-service-account-credentials=true
- --use-service-account-credentials=false
- --controllers={{- trimAll "," (include "occm.enabledControllers" . ) -}}
{{- if .Values.serviceMonitor.enabled }}
- --bind-address=0.0.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.secret.name | default "cloud-config" }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
apiVersion: v1
kind: Service
metadata:
labels:
{{- include "occm.labels" . | nindent 4 }}
name: {{ include "occm.name" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccountName }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
{{- include "occm.labels" . | nindent 4 }}
name: {{ include "occm.name" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/openstack-cloud-controller-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ cloudConfig:
loadBalancer:
blockStorage:
metadata:
route:

# Allow for specifying internal IP addresses for multiple hostnames
# hostAliases:
Expand Down
39 changes: 27 additions & 12 deletions cmd/cinder-csi-plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ import (
)

var (
endpoint string
nodeID string
cloudConfig []string
cluster string
httpEndpoint string
endpoint string
nodeID string
cloudConfig []string
cluster string
httpEndpoint string
provideControllerService bool
provideNodeService bool
)

func main() {
cmd := &cobra.Command{
Use: "Cinder",
Use: "cinder-csi-plugin",
Short: "CSI based Cinder driver",
Run: func(cmd *cobra.Command, args []string) {
handle()
Expand All @@ -65,6 +67,10 @@ func main() {

cmd.PersistentFlags().StringVar(&cluster, "cluster", "", "The identifier of the cluster that the plugin is running in.")
cmd.PersistentFlags().StringVar(&httpEndpoint, "http-endpoint", "", "The TCP network address where the HTTP server for providing metrics for diagnostics, will listen (example: `:8080`). The default is empty string, which means the server is disabled.")

cmd.PersistentFlags().BoolVar(&provideControllerService, "provide-controller-service", true, "If set to true then the CSI driver does provide the controller service (default: true)")
cmd.PersistentFlags().BoolVar(&provideNodeService, "provide-node-service", true, "If set to true then the CSI driver does provide the node service (default: true)")

openstack.AddExtraFlags(pflag.CommandLine)

code := cli.Run(cmd)
Expand All @@ -73,19 +79,28 @@ func main() {

func handle() {
// Initialize cloud
d := cinder.NewDriver(endpoint, cluster)
d := cinder.NewDriver(&cinder.DriverOpts{Endpoint: endpoint, ClusterID: cluster})

openstack.InitOpenStackProvider(cloudConfig, httpEndpoint)
cloud, err := openstack.GetOpenStackProvider()
if err != nil {
klog.Warningf("Failed to GetOpenStackProvider: %v", err)
return
}
//Initialize mount
mount := mount.GetMountProvider()

//Initialize Metadata
metadata := metadata.GetMetadataProvider(cloud.GetMetadataOpts().SearchOrder)
if provideControllerService {
d.SetupControllerService(cloud)
}

if provideNodeService {
//Initialize mount
mount := mount.GetMountProvider()

//Initialize Metadata
metadata := metadata.GetMetadataProvider(cloud.GetMetadataOpts().SearchOrder)

d.SetupNodeService(cloud, mount, metadata)
}

d.SetupDriver(cloud, mount, metadata)
d.Run()
}
87 changes: 41 additions & 46 deletions cmd/client-keystone-auth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,20 @@ limitations under the License.
package main

import (
"flag"
"fmt"
"io"
"os"
"time"

"github.com/gophercloud/gophercloud"
"github.com/gophercloud/utils/openstack/clientconfig"
"github.com/spf13/pflag"
"k8s.io/component-base/logs"
"github.com/spf13/cobra"
"k8s.io/component-base/cli"

"golang.org/x/term"

"k8s.io/cloud-provider-openstack/pkg/identity/keystone"
"k8s.io/cloud-provider-openstack/pkg/version"
kflag "k8s.io/component-base/cli/flag"
"k8s.io/klog/v2"
)

const errRespTemplate string = `{
Expand Down Expand Up @@ -137,51 +134,49 @@ func argumentsAreSet(url, user, project, password, domain, applicationCredential
return false
}

var (
url string
domain string
user string
project string
password string
clientCertPath string
clientKeyPath string
clientCAPath string
options keystone.Options
err error
applicationCredentialID string
applicationCredentialName string
applicationCredentialSecret string
)

func main() {
var url string
var domain string
var user string
var project string
var password string
var clientCertPath string
var clientKeyPath string
var clientCAPath string
var options keystone.Options
var err error
var applicationCredentialID string
var applicationCredentialName string
var applicationCredentialSecret string
var showVersion bool

pflag.StringVar(&url, "keystone-url", os.Getenv("OS_AUTH_URL"), "URL for the OpenStack Keystone API")
pflag.StringVar(&domain, "domain-name", os.Getenv("OS_DOMAIN_NAME"), "Keystone domain name")
pflag.StringVar(&user, "user-name", os.Getenv("OS_USERNAME"), "User name")
pflag.StringVar(&project, "project-name", os.Getenv("OS_PROJECT_NAME"), "Keystone project name")
pflag.StringVar(&password, "password", os.Getenv("OS_PASSWORD"), "Password")
pflag.StringVar(&clientCertPath, "cert", os.Getenv("OS_CERT"), "Client certificate bundle file")
pflag.StringVar(&clientKeyPath, "key", os.Getenv("OS_KEY"), "Client certificate key file")
pflag.StringVar(&clientCAPath, "cacert", os.Getenv("OS_CACERT"), "Certificate authority file")
pflag.StringVar(&applicationCredentialID, "application-credential-id", os.Getenv("OS_APPLICATION_CREDENTIAL_ID"), "Application Credential ID")
pflag.StringVar(&applicationCredentialName, "application-credential-name", os.Getenv("OS_APPLICATION_CREDENTIAL_NAME"), "Application Credential Name")
pflag.StringVar(&applicationCredentialSecret, "application-credential-secret", os.Getenv("OS_APPLICATION_CREDENTIAL_SECRET"), "Application Credential Secret")
pflag.BoolVar(&showVersion, "version", false, "Show current version and exit")

logs.AddFlags(pflag.CommandLine)

klogFlags := flag.NewFlagSet("klog", flag.ExitOnError)
klog.InitFlags(klogFlags)
pflag.CommandLine.AddGoFlagSet(klogFlags)

kflag.InitFlags()

if showVersion {
fmt.Println(version.Version)
os.Exit(0)
cmd := &cobra.Command{
Use: "client-keystone-auth",
Short: "Keystone client credential plugin for Kubernetes",
Run: func(cmd *cobra.Command, args []string) {
handle()
},
Version: version.Version,
}

logs.InitLogs()
defer logs.FlushLogs()
cmd.PersistentFlags().StringVar(&url, "keystone-url", os.Getenv("OS_AUTH_URL"), "URL for the OpenStack Keystone API")
cmd.PersistentFlags().StringVar(&domain, "domain-name", os.Getenv("OS_DOMAIN_NAME"), "Keystone domain name")
cmd.PersistentFlags().StringVar(&user, "user-name", os.Getenv("OS_USERNAME"), "User name")
cmd.PersistentFlags().StringVar(&project, "project-name", os.Getenv("OS_PROJECT_NAME"), "Keystone project name")
cmd.PersistentFlags().StringVar(&password, "password", os.Getenv("OS_PASSWORD"), "Password")
cmd.PersistentFlags().StringVar(&clientCertPath, "cert", os.Getenv("OS_CERT"), "Client certificate bundle file")
cmd.PersistentFlags().StringVar(&clientKeyPath, "key", os.Getenv("OS_KEY"), "Client certificate key file")
cmd.PersistentFlags().StringVar(&clientCAPath, "cacert", os.Getenv("OS_CACERT"), "Certificate authority file")
cmd.PersistentFlags().StringVar(&applicationCredentialID, "application-credential-id", os.Getenv("OS_APPLICATION_CREDENTIAL_ID"), "Application Credential ID")
cmd.PersistentFlags().StringVar(&applicationCredentialName, "application-credential-name", os.Getenv("OS_APPLICATION_CREDENTIAL_NAME"), "Application Credential Name")
cmd.PersistentFlags().StringVar(&applicationCredentialSecret, "application-credential-secret", os.Getenv("OS_APPLICATION_CREDENTIAL_SECRET"), "Application Credential Secret")

code := cli.Run(cmd)
os.Exit(code)
}

func handle() {
// Generate Gophercloud Auth Options based on input data from stdin
// if IsTerminal returns "true", or from env variables otherwise.
if !term.IsTerminal(int(os.Stdin.Fd())) {
Expand Down
Loading