From 8d3a43a46f1a5894b4100d763431d38c6d93c669 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Thu, 22 Dec 2022 21:22:04 +0100 Subject: [PATCH] fixed the container port being 6000, which coinsides with X11 --- .../k3s/templates/deployments/feedback-deployment.yaml | 2 +- deployment/k3s/templates/ingress/ingress.yaml | 2 +- deployment/k3s/templates/service.yaml | 4 ++-- feedback/Dockerfile | 4 ++-- feedback/README.md | 6 +++--- feedback/src/main.rs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deployment/k3s/templates/deployments/feedback-deployment.yaml b/deployment/k3s/templates/deployments/feedback-deployment.yaml index 957fce3e4..bf38a11c2 100644 --- a/deployment/k3s/templates/deployments/feedback-deployment.yaml +++ b/deployment/k3s/templates/deployments/feedback-deployment.yaml @@ -34,7 +34,7 @@ spec: name: feedback-api-keys # GITHUB_TOKEN, JWT_KEY {{ end }} ports: - - containerPort: 6000 + - containerPort: 6001 name: feedback securityContext: readOnlyRootFilesystem: true diff --git a/deployment/k3s/templates/ingress/ingress.yaml b/deployment/k3s/templates/ingress/ingress.yaml index 4dde0f2fb..aeee17ef2 100644 --- a/deployment/k3s/templates/ingress/ingress.yaml +++ b/deployment/k3s/templates/ingress/ingress.yaml @@ -22,7 +22,7 @@ spec: priority: 13 services: - name: feedback-svc - port: 6000 + port: 6001 - kind: Rule match: Host(`{{ .Values.url }}`) && PathPrefix(`/api/`) priority: 12 diff --git a/deployment/k3s/templates/service.yaml b/deployment/k3s/templates/service.yaml index deaad5a9a..673041cbe 100644 --- a/deployment/k3s/templates/service.yaml +++ b/deployment/k3s/templates/service.yaml @@ -34,8 +34,8 @@ spec: deployment: feedback ports: - name: feedback - port: 6000 - targetPort: 6000 + port: 6001 + targetPort: 6001 --- apiVersion: v1 kind: Service diff --git a/feedback/Dockerfile b/feedback/Dockerfile index 67e08d35a..b324d21bd 100644 --- a/feedback/Dockerfile +++ b/feedback/Dockerfile @@ -20,8 +20,8 @@ COPY --from=compiler /nav/target/release/navigatum-feedback /bin/navigatum-fe ARG GIT_COMMIT_SHA ENV GIT_COMMIT_SHA=${GIT_COMMIT_SHA} -EXPOSE 6000 +EXPOSE 6001 ENTRYPOINT ["tini", "--"] -HEALTHCHECK --start-period=20m --timeout=10s CMD curl --fail localhost:6000/api/feedback/health || exit 1 +HEALTHCHECK --start-period=20m --timeout=10s CMD curl --fail localhost:6001/api/feedback/health || exit 1 CMD /bin/navigatum-feedback diff --git a/feedback/README.md b/feedback/README.md index eb71357a0..58770adff 100644 --- a/feedback/README.md +++ b/feedback/README.md @@ -18,7 +18,7 @@ Please follow the [system dependencys docs](resources/documentation/Dependencys. ### Starting the server Run `cargo run` to start the server. -The server should now be available on `localhost:6000`. +The server should now be available on `localhost:6001`. Note that `cargo run --release` is used to start the server for an optimised production build (use this if you want to profile performance, it makes quite a difference). @@ -42,11 +42,11 @@ To make sure that this specification is up-to-date and without holes, we run [sc python -m venv venv source venv/bin/activate pip install schemathesis -st run --workers=auto --base-url=http://localhost:6000 --checks=all ../openapi.yaml +st run --workers=auto --base-url=http://localhost:6001 --checks=all ../openapi.yaml ``` Some fuzzing-goals may not be available for you locally, as they require prefix-routing (f.ex.`/cdn` to the CDN) and some fuzzing-goals are automatically tested in our CI. -You can exchange `--base-url=http://localhost:6000` to `--base-url=https://nav.tum.sexy` for the full public API, or restrict your scope using a option like `--endpoint=/api/feedback/`. +You can exchange `--base-url=http://localhost:6001` to `--base-url=https://nav.tum.sexy` for the full public API, or restrict your scope using a option like `--endpoint=/api/feedback/`. ## License diff --git a/feedback/src/main.rs b/feedback/src/main.rs index ce20cf911..f0ddbdfa9 100644 --- a/feedback/src/main.rs +++ b/feedback/src/main.rs @@ -72,7 +72,7 @@ async fn main() -> std::io::Result<()> { .app_data(state_feedback.clone()), ) }) - .bind(std::env::var("BIND_ADDRESS").unwrap_or_else(|_| "0.0.0.0:6000".to_string()))? + .bind(std::env::var("BIND_ADDRESS").unwrap_or_else(|_| "0.0.0.0:6001".to_string()))? .run() .await }