diff --git a/README.md b/README.md index 5d939363..aaaa33d3 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,6 @@ X-Openstack-Request-Id: txbb13222da0d94527a7101-00649551fc - [ ] Refactor conf file copying, Secret and ConfigMap usage - [ ] Use Kolla - [ ] Support Network isolation -- [ ] Use memcached if available within cluster ## License diff --git a/api/bases/swift.openstack.org_swiftproxies.yaml b/api/bases/swift.openstack.org_swiftproxies.yaml index 65c25bb7..0cb7c2a8 100644 --- a/api/bases/swift.openstack.org_swiftproxies.yaml +++ b/api/bases/swift.openstack.org_swiftproxies.yaml @@ -48,9 +48,6 @@ spec: spec: description: SwiftProxySpec defines the desired state of SwiftProxy properties: - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageProxy: description: Swift Proxy Container Image URL type: string @@ -271,7 +268,6 @@ spec: description: Name of Secret containing swift.conf type: string required: - - containerImageMemcached - containerImageProxy - memcachedInstance - replicas diff --git a/api/bases/swift.openstack.org_swifts.yaml b/api/bases/swift.openstack.org_swifts.yaml index abc5b009..ea4bd392 100644 --- a/api/bases/swift.openstack.org_swifts.yaml +++ b/api/bases/swift.openstack.org_swifts.yaml @@ -71,9 +71,6 @@ spec: description: SwiftProxy - Spec definition for the Proxy service of this Swift deployment properties: - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageProxy: description: Swift Proxy Container Image URL type: string @@ -302,7 +299,6 @@ spec: description: Name of Secret containing swift.conf type: string required: - - containerImageMemcached - containerImageProxy - memcachedInstance - replicas @@ -342,9 +338,6 @@ spec: containerImageContainer: description: Image URL for Swift container service type: string - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageObject: description: Image URL for Swift object service type: string @@ -381,7 +374,6 @@ spec: required: - containerImageAccount - containerImageContainer - - containerImageMemcached - containerImageObject - containerImageProxy - memcachedInstance diff --git a/api/bases/swift.openstack.org_swiftstorages.yaml b/api/bases/swift.openstack.org_swiftstorages.yaml index 11f27f20..4d79826e 100644 --- a/api/bases/swift.openstack.org_swiftstorages.yaml +++ b/api/bases/swift.openstack.org_swiftstorages.yaml @@ -54,9 +54,6 @@ spec: containerImageContainer: description: Image URL for Swift container service type: string - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageObject: description: Image URL for Swift object service type: string @@ -93,7 +90,6 @@ spec: required: - containerImageAccount - containerImageContainer - - containerImageMemcached - containerImageObject - containerImageProxy - memcachedInstance diff --git a/api/v1beta1/swift_types.go b/api/v1beta1/swift_types.go index aec20d39..0de9704e 100644 --- a/api/v1beta1/swift_types.go +++ b/api/v1beta1/swift_types.go @@ -28,7 +28,6 @@ const ( ContainerImageContainer = "quay.io/podified-antelope-centos9/openstack-swift-container:current-podified" ContainerImageObject = "quay.io/podified-antelope-centos9/openstack-swift-object:current-podified" ContainerImageProxy = "quay.io/podified-antelope-centos9/openstack-swift-proxy-server:current-podified" - ContainerImageMemcached = "quay.io/podified-antelope-centos9/openstack-memcached:current-podified" ) // SwiftSpec defines the desired state of Swift @@ -128,7 +127,6 @@ func SetupDefaults() { ContainerContainerImageURL: util.GetEnvVar("RELATED_IMAGE_SWIFT_CONTAINER_IMAGE_URL_DEFAULT", ContainerImageContainer), ObjectContainerImageURL: util.GetEnvVar("RELATED_IMAGE_SWIFT_OBJECT_IMAGE_URL_DEFAULT", ContainerImageObject), ProxyContainerImageURL: util.GetEnvVar("RELATED_IMAGE_SWIFT_PROXY_IMAGE_URL_DEFAULT", ContainerImageProxy), - MemcachedContainerImageURL: util.GetEnvVar("RELATED_IMAGE_SWIFT_MEMCACHED_IMAGE_URL_DEFAULT", ContainerImageMemcached), } SetupSwiftDefaults(swiftDefaults) diff --git a/api/v1beta1/swift_webhook.go b/api/v1beta1/swift_webhook.go index 79ab1ea2..521e7515 100644 --- a/api/v1beta1/swift_webhook.go +++ b/api/v1beta1/swift_webhook.go @@ -34,7 +34,6 @@ type SwiftDefaults struct { ContainerContainerImageURL string ObjectContainerImageURL string ProxyContainerImageURL string - MemcachedContainerImageURL string } var swiftDefaults SwiftDefaults @@ -94,18 +93,10 @@ func (spec *SwiftSpec) Default() { spec.SwiftStorage.ContainerImageProxy = swiftDefaults.ProxyContainerImageURL } - if spec.SwiftStorage.ContainerImageMemcached == "" { - spec.SwiftStorage.ContainerImageMemcached = swiftDefaults.MemcachedContainerImageURL - } - // proxy if spec.SwiftProxy.ContainerImageProxy == "" { spec.SwiftProxy.ContainerImageProxy = swiftDefaults.ProxyContainerImageURL } - - if spec.SwiftProxy.ContainerImageMemcached == "" { - spec.SwiftProxy.ContainerImageMemcached = swiftDefaults.MemcachedContainerImageURL - } } // TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation. diff --git a/api/v1beta1/swiftproxy_types.go b/api/v1beta1/swiftproxy_types.go index fc85b5d1..4e2eddfd 100644 --- a/api/v1beta1/swiftproxy_types.go +++ b/api/v1beta1/swiftproxy_types.go @@ -46,8 +46,6 @@ type SwiftProxySpec struct { ContainerImageProxy string `json:"containerImageProxy"` // +kubebuilder:validation:Required - // Image URL for Memcache servicd - ContainerImageMemcached string `json:"containerImageMemcached"` // +kubebuilder:default=memcached // Memcached instance name. MemcachedInstance string `json:"memcachedInstance"` diff --git a/api/v1beta1/swiftstorage_types.go b/api/v1beta1/swiftstorage_types.go index 3b43a75e..129132e8 100644 --- a/api/v1beta1/swiftstorage_types.go +++ b/api/v1beta1/swiftstorage_types.go @@ -62,10 +62,6 @@ type SwiftStorageSpec struct { // Image URL for Swift proxy service ContainerImageProxy string `json:"containerImageProxy"` - // +kubebuilder:validation:Required - // Image URL for Memcache servicd - ContainerImageMemcached string `json:"containerImageMemcached"` - // +kubebuilder:validation:Required // +kubebuilder:default=swift-conf // Name of Secret containing swift.conf diff --git a/config/crd/bases/swift.openstack.org_swiftproxies.yaml b/config/crd/bases/swift.openstack.org_swiftproxies.yaml index 65c25bb7..0cb7c2a8 100644 --- a/config/crd/bases/swift.openstack.org_swiftproxies.yaml +++ b/config/crd/bases/swift.openstack.org_swiftproxies.yaml @@ -48,9 +48,6 @@ spec: spec: description: SwiftProxySpec defines the desired state of SwiftProxy properties: - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageProxy: description: Swift Proxy Container Image URL type: string @@ -271,7 +268,6 @@ spec: description: Name of Secret containing swift.conf type: string required: - - containerImageMemcached - containerImageProxy - memcachedInstance - replicas diff --git a/config/crd/bases/swift.openstack.org_swifts.yaml b/config/crd/bases/swift.openstack.org_swifts.yaml index abc5b009..ea4bd392 100644 --- a/config/crd/bases/swift.openstack.org_swifts.yaml +++ b/config/crd/bases/swift.openstack.org_swifts.yaml @@ -71,9 +71,6 @@ spec: description: SwiftProxy - Spec definition for the Proxy service of this Swift deployment properties: - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageProxy: description: Swift Proxy Container Image URL type: string @@ -302,7 +299,6 @@ spec: description: Name of Secret containing swift.conf type: string required: - - containerImageMemcached - containerImageProxy - memcachedInstance - replicas @@ -342,9 +338,6 @@ spec: containerImageContainer: description: Image URL for Swift container service type: string - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageObject: description: Image URL for Swift object service type: string @@ -381,7 +374,6 @@ spec: required: - containerImageAccount - containerImageContainer - - containerImageMemcached - containerImageObject - containerImageProxy - memcachedInstance diff --git a/config/crd/bases/swift.openstack.org_swiftstorages.yaml b/config/crd/bases/swift.openstack.org_swiftstorages.yaml index 11f27f20..4d79826e 100644 --- a/config/crd/bases/swift.openstack.org_swiftstorages.yaml +++ b/config/crd/bases/swift.openstack.org_swiftstorages.yaml @@ -54,9 +54,6 @@ spec: containerImageContainer: description: Image URL for Swift container service type: string - containerImageMemcached: - description: Image URL for Memcache servicd - type: string containerImageObject: description: Image URL for Swift object service type: string @@ -93,7 +90,6 @@ spec: required: - containerImageAccount - containerImageContainer - - containerImageMemcached - containerImageObject - containerImageProxy - memcachedInstance diff --git a/config/default/manager_default_images.yaml b/config/default/manager_default_images.yaml index 0a98a4ce..0011216a 100644 --- a/config/default/manager_default_images.yaml +++ b/config/default/manager_default_images.yaml @@ -19,5 +19,3 @@ spec: value: quay.io/podified-antelope-centos9/openstack-swift-container:current-podified - name: RELATED_IMAGE_SWIFT_OBJECT_IMAGE_URL_DEFAULT value: quay.io/podified-antelope-centos9/openstack-swift-object:current-podified - - name: RELATED_IMAGE_SWIFT_MEMCACHED_IMAGE_URL_DEFAULT - value: quay.io/podified-antelope-centos9/openstack-memcached:current-podified diff --git a/controllers/swift_controller.go b/controllers/swift_controller.go index d986e398..c94f5457 100644 --- a/controllers/swift_controller.go +++ b/controllers/swift_controller.go @@ -350,7 +350,6 @@ func (r *SwiftReconciler) storageCreateOrUpdate(ctx context.Context, instance *s ContainerImageContainer: instance.Spec.SwiftStorage.ContainerImageContainer, ContainerImageObject: instance.Spec.SwiftStorage.ContainerImageObject, ContainerImageProxy: instance.Spec.SwiftStorage.ContainerImageProxy, - ContainerImageMemcached: instance.Spec.SwiftStorage.ContainerImageMemcached, SwiftConfSecret: instance.Spec.SwiftConfSecret, NetworkAttachments: instance.Spec.SwiftStorage.NetworkAttachments, MemcachedInstance: instance.Spec.MemcachedInstance, @@ -381,7 +380,6 @@ func (r *SwiftReconciler) proxyCreateOrUpdate(ctx context.Context, instance *swi swiftProxySpec := swiftv1.SwiftProxySpec{ Replicas: instance.Spec.SwiftProxy.Replicas, ContainerImageProxy: instance.Spec.SwiftProxy.ContainerImageProxy, - ContainerImageMemcached: instance.Spec.SwiftProxy.ContainerImageMemcached, Secret: instance.Spec.SwiftProxy.Secret, ServiceUser: instance.Spec.SwiftProxy.ServiceUser, PasswordSelectors: instance.Spec.SwiftProxy.PasswordSelectors, diff --git a/pkg/swift/const.go b/pkg/swift/const.go index e7343d69..318ae7ad 100644 --- a/pkg/swift/const.go +++ b/pkg/swift/const.go @@ -16,9 +16,8 @@ limitations under the License. package swift const ( - RunAsUser int64 = 42445 - ProxyPort int32 = 8080 - MemcachedPort int32 = 11211 + RunAsUser int64 = 42445 + ProxyPort int32 = 8080 AccountServerPort int32 = 6202 ContainerServerPort int32 = 6201 diff --git a/pkg/swiftproxy/deployment.go b/pkg/swiftproxy/deployment.go index d476070e..ee595fd2 100644 --- a/pkg/swiftproxy/deployment.go +++ b/pkg/swiftproxy/deployment.go @@ -101,18 +101,6 @@ func Deployment( VolumeMounts: getProxyVolumeMounts(), Command: []string{"/usr/bin/swift-proxy-server", "/etc/swift/proxy-server.conf", "-v"}, }, - { - Image: instance.Spec.ContainerImageMemcached, - Name: "memcached", - ImagePullPolicy: corev1.PullIfNotPresent, - SecurityContext: &securityContext, - Ports: []corev1.ContainerPort{{ - ContainerPort: swift.MemcachedPort, - Name: "memcached", - }}, - VolumeMounts: getProxyVolumeMounts(), - Command: []string{"/usr/bin/memcached", "-p", "11211", "-u", "memcached"}, - }, }, }, }, diff --git a/pkg/swiftstorage/statefulset.go b/pkg/swiftstorage/statefulset.go index 5fe5823a..e2831612 100644 --- a/pkg/swiftstorage/statefulset.go +++ b/pkg/swiftstorage/statefulset.go @@ -163,14 +163,6 @@ func getStorageContainers(swiftstorage *swiftv1beta1.SwiftStorage) []corev1.Cont VolumeMounts: getStorageVolumeMounts(), Command: []string{"/usr/bin/rsync", "--daemon", "--no-detach", "--config=/etc/swift/rsyncd.conf", "--log-file=/dev/stdout"}, }, - { - Name: "memcached", - Image: swiftstorage.Spec.ContainerImageMemcached, - ImagePullPolicy: corev1.PullIfNotPresent, - SecurityContext: &securityContext, - Ports: getPorts(swift.MemcachedPort, "memcached"), - Command: []string{"/usr/bin/memcached", "-p", "11211", "-u", "memcached"}, - }, } }