forked from eclipse-tractusx/tutorial-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update deployment for data-service-api
- Loading branch information
1 parent
a0e5df2
commit 03c938a
Showing
10 changed files
with
169 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...vice-api/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# | ||
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Contributors: | ||
# Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
# | ||
# | ||
|
||
org.eclipse.tractusx.mxd.dataservice.DataServiceExtension |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# | ||
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Contributors: | ||
# Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
# | ||
# | ||
|
||
resource "kubernetes_deployment" "data-service-api" { | ||
|
||
metadata { | ||
name = "data-service-api" | ||
namespace = kubernetes_namespace.mxd-ns.metadata.0.name | ||
labels = { | ||
App = "data-service-api" | ||
} | ||
} | ||
|
||
spec { | ||
replicas = 1 | ||
selector { | ||
match_labels = { | ||
App = "data-service-api" | ||
} | ||
} | ||
template { | ||
metadata { | ||
labels = { | ||
App = "data-service-api" | ||
} | ||
} | ||
spec { | ||
container { | ||
name = "data-service-api" | ||
image = "data-service-api:latest" | ||
image_pull_policy = "Never" | ||
|
||
port { | ||
container_port = 8080 | ||
name = "api-port" | ||
} | ||
|
||
env { | ||
name = "web.http.data.port" | ||
value = 8080 | ||
} | ||
env { | ||
name = "web.http.data.path" | ||
value = "/" | ||
} | ||
env { | ||
name = "web.http.port" | ||
value = 8181 | ||
} | ||
env { | ||
name = "web.http.path" | ||
value = "/api" | ||
} | ||
env { | ||
name = "JAVA_TOOL_OPTIONS" | ||
value = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044" | ||
} | ||
readiness_probe { | ||
http_get { | ||
path = "/api/check/readiness" | ||
port = 8181 | ||
} | ||
initial_delay_seconds = 5 | ||
period_seconds = 10 | ||
timeout_seconds = 5 | ||
failure_threshold = 3 | ||
success_threshold = 1 | ||
} | ||
liveness_probe { | ||
http_get { | ||
path = "/api/check/liveness" | ||
port = 8181 | ||
} | ||
initial_delay_seconds = 5 | ||
period_seconds = 10 | ||
timeout_seconds = 5 | ||
failure_threshold = 3 | ||
success_threshold = 1 | ||
} | ||
|
||
startup_probe { | ||
http_get { | ||
path = "/api/check/startup" | ||
port = 8181 | ||
} | ||
initial_delay_seconds = 5 | ||
period_seconds = 10 | ||
timeout_seconds = 5 | ||
failure_threshold = 3 | ||
success_threshold = 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
resource "kubernetes_service" "data-service-api" { | ||
metadata { | ||
name = "data-service-api" | ||
namespace = var.namespace | ||
} | ||
spec { | ||
type = "NodePort" | ||
selector = { | ||
App = kubernetes_deployment.data-service-api.spec.0.template.0.metadata[0].labels.App | ||
} | ||
port { | ||
port = 8080 | ||
name = "api-port" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.