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 # 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 refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.31.0 ENVTEST_K8S_VERSION = 1.31.0

View File

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

View File

@@ -27,8 +27,8 @@ func gatewayConfig(r GatewayReconciler, ctx context.Context, req ctrl.Request, g
} }
// attach cert files // attach cert files
if len(gateway.Spec.Server.TlsSecretName) != 0 { if len(gateway.Spec.Server.TlsSecretName) != 0 {
gomaConfig.Gateway.SSLKeyFile = TLSKeyFile gomaConfig.Gateway.TlsCertFile = TLSCertFile
gomaConfig.Gateway.SSLCertFile = TLSCertFile gomaConfig.Gateway.TlsKeyFile = TLSKeyFile
} }
labelSelector := client.MatchingLabels{} labelSelector := client.MatchingLabels{}
@@ -79,8 +79,8 @@ func updateGatewayConfig(r RouteReconciler, ctx context.Context, req ctrl.Reques
} }
// attach cert files // attach cert files
if len(gateway.Spec.Server.TlsSecretName) != 0 { if len(gateway.Spec.Server.TlsSecretName) != 0 {
gomaConfig.Gateway.SSLKeyFile = TLSKeyFile gomaConfig.Gateway.TlsCertFile = TLSCertFile
gomaConfig.Gateway.SSLCertFile = TLSCertFile gomaConfig.Gateway.TlsKeyFile = TLSKeyFile
} }
labelSelector := client.MatchingLabels{} labelSelector := client.MatchingLabels{}
var middlewareNames []string 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 // Gateway contains Goma Proxy Gateway's configs
type Gateway struct { type Gateway struct {
// SSLCertFile SSL Certificate file // TlsCertFile SSL Certificate file
SSLCertFile string `yaml:"sslCertFile"` TlsCertFile string `yaml:"TlsCertFile"`
// SSLKeyFile SSL Private key file // TlsKeyFile SSL Private key file
SSLKeyFile string `yaml:"sslKeyFile"` TlsKeyFile string `yaml:"TlsKeyFile"`
// Redis contains redis database details // Redis contains redis database details
Redis gomaprojv1beta1.Redis `yaml:"redis"` Redis gomaprojv1beta1.Redis `yaml:"redis"`
// WriteTimeout defines proxy write timeout // WriteTimeout defines proxy write timeout