diff --git a/Makefile b/Makefile index 2dd64f2..5fda5fa 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 8a2e56f..91b51b2 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -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 diff --git a/dist/install.yaml b/dist/install.yaml index d1751c4..eb05b31 100644 --- a/dist/install.yaml +++ b/dist/install.yaml @@ -1286,95 +1286,84 @@ spec: spec: description: RouteSpec defines the desired state of Route. properties: - gateway: - type: string - routes: + backends: items: - properties: - backends: - items: - type: string - type: array - blockCommonExploits: - description: BlockCommonExploits enable, disable block common - exploits - type: boolean - cors: - description: Cors contains the route cors headers - properties: - headers: - additionalProperties: - type: string - description: Headers contains custom headers - type: object - origins: - description: Cors contains Allowed origins, - items: - type: string - type: array - type: object - destination: - description: Destination Defines backend URL - type: string - disableHostFording: - description: DisableHostFording Disable host forwarding. - type: boolean - healthCheck: - description: HealthCheck Defines the backend is health - properties: - healthyStatuses: - items: - type: integer - type: array - interval: - type: string - path: - type: string - timeout: - type: string - type: object - hosts: - description: Hosts Domains/hosts based request routing - items: - type: string - type: array - insecureSkipVerify: - type: boolean - interceptErrors: - description: InterceptErrors intercepts backend errors based - on the status codes - items: - type: integer - type: array - methods: - description: Methods allowed method - items: - type: string - type: array - middlewares: - description: Middlewares Defines route middleware - items: - type: string - type: array - name: - description: Name defines route name - type: string - path: - description: Path defines route path - type: string - rateLimit: - type: integer - rewrite: - description: Rewrite rewrites route path to desired path - type: string - required: - - name - - path - type: object + type: string type: array + blockCommonExploits: + description: BlockCommonExploits enable, disable block common exploits + type: boolean + cors: + description: Cors contains the route cors headers + properties: + headers: + additionalProperties: + type: string + description: Headers contains custom headers + type: object + origins: + description: Cors contains Allowed origins, + items: + type: string + type: array + type: object + destination: + description: Destination Defines backend URL + type: string + disableHostFording: + 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: + healthyStatuses: + items: + type: integer + type: array + interval: + type: string + path: + type: string + timeout: + type: string + type: object + hosts: + description: Hosts Domains/hosts based request routing + items: + type: string + type: array + insecureSkipVerify: + type: boolean + interceptErrors: + description: InterceptErrors intercepts backend errors based on the + status codes + items: + type: integer + type: array + methods: + description: Methods allowed method + items: + type: string + type: array + middlewares: + description: Middlewares Defines route middleware + items: + type: string + type: array + path: + description: Path defines route path + type: string + rateLimit: + type: integer + rewrite: + description: Rewrite rewrites route path to desired path + type: string 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 diff --git a/internal/controller/helpers.go b/internal/controller/helpers.go index 67214e4..1b048d5 100644 --- a/internal/controller/helpers.go +++ b/internal/controller/helpers.go @@ -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 diff --git a/internal/controller/types.go b/internal/controller/types.go index b461dcd..de28405 100644 --- a/internal/controller/types.go +++ b/internal/controller/types.go @@ -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