Skip to content

Commit 8734adf

Browse files
committed
Allow defaultConfigOverwrite to replace httpd.conf
For nova-api and nova-metadata we now allow to replace the whole apache httpd.conf file. The replacement can be a template the same way as the default file in templates/novaapi/config/httpd.conf is a template. This is expected to be only used for advanced troubleshooting and not for customization for production use. Any permanent customization needs to go through the CR interface (and potentially need an RFE to extend such interface) Signed-off-by: Balazs Gibizer <gibi@redhat.com>
1 parent ed0bef5 commit 8734adf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

api/v1beta1/novaapi_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import (
3434
"sigs.k8s.io/controller-runtime/pkg/webhook"
3535
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3636

37-
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
3837
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
38+
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
3939
)
4040

4141
// NovaAPIDefaults -
@@ -148,7 +148,7 @@ func ValidateAPIDefaultConfigOverwrite(
148148
return ValidateDefaultConfigOverwrite(
149149
basePath,
150150
defaultConfigOverwrite,
151-
[]string{"policy.yaml", "api-paste.ini"})
151+
[]string{"policy.yaml", "api-paste.ini", "httpd.conf"})
152152
}
153153

154154
// ValidateTopology validates the referenced TopoRef.Namespace.

api/v1beta1/novametadata_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ import (
2626
"fmt"
2727

2828
"github.com/google/go-cmp/cmp"
29+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2930
apierrors "k8s.io/apimachinery/pkg/api/errors"
3031
"k8s.io/apimachinery/pkg/runtime"
3132
"k8s.io/apimachinery/pkg/runtime/schema"
3233
"k8s.io/apimachinery/pkg/util/validation/field"
3334
logf "sigs.k8s.io/controller-runtime/pkg/log"
3435
"sigs.k8s.io/controller-runtime/pkg/webhook"
3536
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
36-
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3737
)
3838

3939
// NovaMetadataDefaults -
@@ -156,7 +156,7 @@ func ValidateMetadataDefaultConfigOverwrite(
156156
defaultConfigOverwrite map[string]string,
157157
) field.ErrorList {
158158
return ValidateDefaultConfigOverwrite(
159-
basePath, defaultConfigOverwrite, []string{"api-paste.ini"})
159+
basePath, defaultConfigOverwrite, []string{"api-paste.ini", "httpd.conf"})
160160
}
161161

162162
// ValidateTopology validates the referenced TopoRef.Namespace.

0 commit comments

Comments
 (0)