Skip to content

Commit

Permalink
OTC Adapation OCCM 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
spielkind committed Aug 25, 2021
1 parent a6a2bea commit aa27354
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sudo: required
dist: bionic

language: go

env:
- GO111MODULE=on

go:
- 1.15.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@f069393c8e2cf2a40d9f56763d5f23a1850f7209
- make image-controller-manager
- docker images
- docker tag k8scloudprovider/openstack-cloud-controller-manager:${TAG}-dirty mcsps/cloud-provider-opentelekomcloud:1.22
- docker push mcsps/cloud-provider-opentelekomcloud:1.22
- make image-cinder-csi-plugin
- docker images
- docker tag k8scloudprovider/cinder-csi-plugin-amd64:${TAG}-dirty mcsps/cinder-csi-plugin:1.22
- docker push mcsps/cinder-csi-plugin:1.22
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 @@ -67,6 +67,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
12 changes: 7 additions & 5 deletions pkg/openstack/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ func (lbaas *LbaasV2) ensureOctaviaListener(lbID string, oldListeners []listener
updateOpts.ConnLimit = &svcConf.connLimit
listenerChanged = true
}

/*
listenerKeepClientIP := listener.InsertHeaders[annotationXForwardedFor] == "true"
if svcConf.keepClientIP != listenerKeepClientIP {
updateOpts.InsertHeaders = &listener.InsertHeaders
Expand All @@ -1535,6 +1535,7 @@ func (lbaas *LbaasV2) ensureOctaviaListener(lbID string, oldListeners []listener
}
listenerChanged = true
}
*/
if svcConf.tlsContainerRef != listener.DefaultTlsContainerRef {
updateOpts.DefaultTlsContainerRef = &svcConf.tlsContainerRef
listenerChanged = true
Expand Down Expand Up @@ -1591,11 +1592,11 @@ func (lbaas *LbaasV2) buildListenerCreateOpt(port corev1.ServicePort, svcConf *s
listenerCreateOpt.TimeoutMemberData = &svcConf.timeoutMemberData
listenerCreateOpt.TimeoutTCPInspect = &svcConf.timeoutTCPInspect
}

/*
if svcConf.keepClientIP {
listenerCreateOpt.InsertHeaders = map[string]string{annotationXForwardedFor: "true"}
}

*/
if svcConf.tlsContainerRef != "" {
listenerCreateOpt.DefaultTlsContainerRef = svcConf.tlsContainerRef
}
Expand Down Expand Up @@ -2129,6 +2130,7 @@ func (lbaas *LbaasV2) ensureLoadBalancer(ctx context.Context, clusterName string
}

if lbaas.opts.UseOctavia {
/*
if keepClientIP {
if listenerCreateOpt.Protocol != listeners.ProtocolHTTP {
klog.V(4).Infof("Forcing to use %q protocol for listener because %q "+
Expand All @@ -2137,7 +2139,7 @@ func (lbaas *LbaasV2) ensureLoadBalancer(ctx context.Context, clusterName string
}
listenerCreateOpt.InsertHeaders = map[string]string{"X-Forwarded-For": "true"}
}

*/
listenerCreateOpt.TimeoutClientData = &timeoutClientData
listenerCreateOpt.TimeoutMemberData = &timeoutMemberData
listenerCreateOpt.TimeoutMemberConnect = &timeoutMemberConnect
Expand Down Expand Up @@ -2457,7 +2459,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

0 comments on commit aa27354

Please sign in to comment.