Skip to content

Commit

Permalink
OTC Adapation OCCM 1.19.2
Browse files Browse the repository at this point in the history
* remove InsertHeaders for ELB
* remove Description for EIP
* make all EVS in Cinder CSI as multiattach feature
  • Loading branch information
eumel8 committed Dec 1, 2020
1 parent 445f068 commit 94cc046
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
sudo: required
dist: bionic

language: go

env:
- GO111MODULE=on

go:
- 1.14.x

addons:
apt:
packages:
- docker.io

services:
- docker

script:
- sudo systemctl unmask docker
- sudo systemctl start docker
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USER" --password-stdin
- TAG=`git describe --match=$(git rev-parse --short=8 HEAD) --always --dirty --abbrev=8`
- go version
- go mod edit --replace github.com/gophercloud/gophercloud=github.com/mcsps/gophercloud@e9621d586645ac903f74ddddaf1d342f5bed6a0c
- make image-controller-manager
- docker images
- docker tag k8scloudprovider/openstack-cloud-controller-manager:${TAG}-dirty mcsps/cloud-provider-opentelekomcloud:1.19
- docker push mcsps/cloud-provider-opentelekomcloud:1.19
- make image-cinder-csi-plugin
- docker images
- docker tag k8scloudprovider/cinder-csi-plugin:${TAG}-dirty mcsps/cinder-csi-plugin:1.19
- docker push mcsps/cinder-csi-plugin:1.19

Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ func (lbaas *LbaasV2) ensureOctaviaListener(lbID string, oldListeners []listener
klog.V(4).Infof("Forcing to use %q protocol for listener because %q annotation is set", listeners.ProtocolHTTP, ServiceAnnotationLoadBalancerXForwardedFor)
listenerCreateOpt.Protocol = listeners.ProtocolHTTP
}
listenerCreateOpt.InsertHeaders = map[string]string{annotationXForwardedFor: "true"}
// listenerCreateOpt.InsertHeaders = map[string]string{annotationXForwardedFor: "true"}
}

if len(svcConf.allowedCIDR) > 0 {
Expand All @@ -1159,6 +1159,7 @@ func (lbaas *LbaasV2) ensureOctaviaListener(lbID string, oldListeners []listener
updateOpts.ConnLimit = &svcConf.connLimit
listenerChanged = true
}
/*
updateOpts.InsertHeaders = &listener.InsertHeaders
listenerKeepClientIP := listener.InsertHeaders[annotationXForwardedFor] == "true"
if svcConf.keepClientIP != listenerKeepClientIP {
Expand All @@ -1169,6 +1170,7 @@ func (lbaas *LbaasV2) ensureOctaviaListener(lbID string, oldListeners []listener
}
listenerChanged = true
}
*/
if openstackutil.IsOctaviaFeatureSupported(lbaas.lb, openstackutil.OctaviaFeatureTimeout) {
if svcConf.timeoutClientData != listener.TimeoutClientData {
updateOpts.TimeoutClientData = &svcConf.timeoutClientData
Expand Down Expand Up @@ -1665,7 +1667,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(ctx context.Context, clusterName string
"annotation is set", listeners.ProtocolHTTP, ServiceAnnotationLoadBalancerXForwardedFor)
listenerCreateOpt.Protocol = listeners.ProtocolHTTP
}
listenerCreateOpt.InsertHeaders = map[string]string{"X-Forwarded-For": "true"}
//listenerCreateOpt.InsertHeaders = map[string]string{"X-Forwarded-For": "true"}
}

listenerCreateOpt.TimeoutClientData = &timeoutClientData
Expand Down Expand Up @@ -1961,7 +1963,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(ctx context.Context, clusterName string
floatIPOpts := floatingips.CreateOpts{
FloatingNetworkID: floatingNetworkID,
PortID: portID,
Description: fmt.Sprintf("Floating IP for Kubernetes external service %s from cluster %s", serviceName, clusterName),
// Description: fmt.Sprintf("Floating IP for Kubernetes external service %s from cluster %s", serviceName, clusterName),
}

if floatingSubnetID != "" {
Expand Down
1 change: 1 addition & 0 deletions pkg/csi/cinder/openstack/openstack_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (os *OpenStack) CreateVolume(name string, size int, vtype, availability str
VolumeType: vtype,
AvailabilityZone: availability,
Description: volumeDescription,
Multiattach: true,
SnapshotID: snapshotID,
SourceVolID: sourcevolID,
}
Expand Down

0 comments on commit 94cc046

Please sign in to comment.