diff --git a/README.md b/README.md index fa9b13e..18c7579 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,9 @@ docker run --rm --name goma-gateway \ ``` ### 4. Healthcheck -- Goma Gateway health check: `/health/live` +- Goma Gateway health check: + - `/readyz` + - `/healthz` - Routes health check: `/health/routes` diff --git a/docs/install/kubernetes.md b/docs/install/kubernetes.md index 2fdf3ba..f22c497 100644 --- a/docs/install/kubernetes.md +++ b/docs/install/kubernetes.md @@ -56,7 +56,7 @@ spec: containers: - name: goma-gateway image: jkaninda/goma-gateway - command: ["goma","server"] + command: ["/usr/local/bin/goma","server"] resources: limits: memory: "128Mi" @@ -65,18 +65,16 @@ spec: - containerPort: 8080 livenessProbe: httpGet: - path: /health/live + path: /healthz port: 8080 initialDelaySeconds: 15 periodSeconds: 30 - timeoutSeconds: 10 readinessProbe: httpGet: - path: /health/live + path: /readyz port: 8080 - initialDelaySeconds: 15 - periodSeconds: 30 - timeoutSeconds: 10 + initialDelaySeconds: 5 + periodSeconds: 10 volumeMounts: - name: config mountPath: /etc/goma/ @@ -84,4 +82,6 @@ spec: - name: config configMap: name: goma-config -``` \ No newline at end of file +``` + +## 4. Kubernetes Advanced deployment using CRDs \ No newline at end of file diff --git a/docs/install/kuberntes-operator.md b/docs/install/kuberntes-operator.md new file mode 100644 index 0000000..aaa94ea --- /dev/null +++ b/docs/install/kuberntes-operator.md @@ -0,0 +1,12 @@ +--- +title: Kubernetes Operator +layout: default +parent: Installation +nav_order: 5 +--- + +# Kubernetes Operator + +**Install the CRDs into the cluster:** + + diff --git a/docs/quickstart/healthcheck.md b/docs/quickstart/healthcheck.md index 3cb3cea..bb97e2a 100644 --- a/docs/quickstart/healthcheck.md +++ b/docs/quickstart/healthcheck.md @@ -27,7 +27,9 @@ gateway: healthyStatuses: [200,404] # Healthy statuses ``` -- Goma Gateway healthcheck: `/health/live` +- Goma Gateway health check: + - `/readyz` + - `/healthz` - Routes health check: `health/routes` ### Gateway healthcheck response: diff --git a/examples/kubernetes.yaml b/examples/kubernetes.yaml index 816c24d..ad16784 100644 --- a/examples/kubernetes.yaml +++ b/examples/kubernetes.yaml @@ -14,7 +14,7 @@ spec: containers: - name: goma-gateway image: jkaninda/goma-gateway - command: ["goma","server"] + command: ["/usr/local/bin/goma","server"] resources: limits: memory: "128Mi" @@ -23,18 +23,16 @@ spec: - containerPort: 8080 livenessProbe: httpGet: - path: /health/live + path: /healthz port: 8080 initialDelaySeconds: 15 periodSeconds: 30 - timeoutSeconds: 10 readinessProbe: httpGet: - path: /health/live + path: /readyz port: 8080 - initialDelaySeconds: 15 - periodSeconds: 30 - timeoutSeconds: 10 + initialDelaySeconds: 5 + periodSeconds: 10 volumeMounts: - name: config mountPath: /etc/goma/ diff --git a/internal/routes.go b/internal/routes.go index aa3e4f0..7bd8abe 100644 --- a/internal/routes.go +++ b/internal/routes.go @@ -78,13 +78,13 @@ func (gatewayServer GatewayServer) Initialize() *mux.Router { } // Routes health check if !gateway.DisableHealthCheckStatus { - r.HandleFunc("/healthz", heath.HealthCheckHandler).Methods("GET") r.HandleFunc("/health/routes", heath.HealthCheckHandler).Methods("GET") } // Health check r.HandleFunc("/health/live", heath.HealthReadyHandler).Methods("GET") r.HandleFunc("/readyz", heath.HealthReadyHandler).Methods("GET") + r.HandleFunc("/healthz", heath.HealthReadyHandler).Methods("GET") // Enable common exploits if gateway.BlockCommonExploits { logger.Info("Block common exploits enabled")