refator: rename ssl to tls

This commit is contained in:
Jonas Kaninda
2024-11-29 14:05:16 +01:00
parent 3bd4b68925
commit 9db20f4577
5 changed files with 85 additions and 96 deletions

View File

@@ -1,5 +1,5 @@
# Image URL to use all building/pushing image targets
IMG ?= jkaninda/goma-operator:0.1.0-rc.3
IMG ?= jkaninda/goma-operator:0.1.0-rc.4
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.31.0

View File

@@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: jkaninda/goma-operator
newTag: 0.1.0-rc.3
newTag: 0.1.0-rc.4

29
dist/install.yaml vendored
View File

@@ -1285,19 +1285,13 @@ spec:
type: object
spec:
description: RouteSpec defines the desired state of Route.
properties:
gateway:
type: string
routes:
items:
properties:
backends:
items:
type: string
type: array
blockCommonExploits:
description: BlockCommonExploits enable, disable block common
exploits
description: BlockCommonExploits enable, disable block common exploits
type: boolean
cors:
description: Cors contains the route cors headers
@@ -1317,8 +1311,11 @@ spec:
description: Destination Defines backend URL
type: string
disableHostFording:
description: DisableHostFording Disable host forwarding.
description: DisableHostFording Disables host forwarding.
type: boolean
gateway:
description: Gateway defines the name of the Gateway resource
type: string
healthCheck:
description: HealthCheck Defines the backend is health
properties:
@@ -1341,8 +1338,8 @@ spec:
insecureSkipVerify:
type: boolean
interceptErrors:
description: InterceptErrors intercepts backend errors based
on the status codes
description: InterceptErrors intercepts backend errors based on the
status codes
items:
type: integer
type: array
@@ -1356,9 +1353,6 @@ spec:
items:
type: string
type: array
name:
description: Name defines route name
type: string
path:
description: Path defines route path
type: string
@@ -1368,13 +1362,8 @@ spec:
description: Rewrite rewrites route path to desired path
type: string
required:
- name
- path
type: object
type: array
required:
- gateway
- routes
- path
type: object
status:
description: RouteStatus defines the observed state of Route.
@@ -1788,7 +1777,7 @@ spec:
- --health-probe-bind-address=:8081
command:
- /manager
image: jkaninda/goma-operator:0.1.0-rc.3
image: jkaninda/goma-operator:0.1.0-rc.4
livenessProbe:
httpGet:
path: /healthz

View File

@@ -27,8 +27,8 @@ func gatewayConfig(r GatewayReconciler, ctx context.Context, req ctrl.Request, g
}
// attach cert files
if len(gateway.Spec.Server.TlsSecretName) != 0 {
gomaConfig.Gateway.SSLKeyFile = TLSKeyFile
gomaConfig.Gateway.SSLCertFile = TLSCertFile
gomaConfig.Gateway.TlsCertFile = TLSCertFile
gomaConfig.Gateway.TlsKeyFile = TLSKeyFile
}
labelSelector := client.MatchingLabels{}
@@ -79,8 +79,8 @@ func updateGatewayConfig(r RouteReconciler, ctx context.Context, req ctrl.Reques
}
// attach cert files
if len(gateway.Spec.Server.TlsSecretName) != 0 {
gomaConfig.Gateway.SSLKeyFile = TLSKeyFile
gomaConfig.Gateway.SSLCertFile = TLSCertFile
gomaConfig.Gateway.TlsCertFile = TLSCertFile
gomaConfig.Gateway.TlsKeyFile = TLSKeyFile
}
labelSelector := client.MatchingLabels{}
var middlewareNames []string

View File

@@ -4,10 +4,10 @@ import gomaprojv1beta1 "github.com/jkaninda/goma-operator/api/v1beta1"
// Gateway contains Goma Proxy Gateway's configs
type Gateway struct {
// SSLCertFile SSL Certificate file
SSLCertFile string `yaml:"sslCertFile"`
// SSLKeyFile SSL Private key file
SSLKeyFile string `yaml:"sslKeyFile"`
// TlsCertFile SSL Certificate file
TlsCertFile string `yaml:"TlsCertFile"`
// TlsKeyFile SSL Private key file
TlsKeyFile string `yaml:"TlsKeyFile"`
// Redis contains redis database details
Redis gomaprojv1beta1.Redis `yaml:"redis"`
// WriteTimeout defines proxy write timeout