-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from europeana/EA-2825_setup_k8s
EA-2825: Setup K8s deployment
- Loading branch information
Showing
9 changed files
with
118 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/manifest.yml | ||
/.env.docker | ||
api-gateway.iml | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
#IntelliJ project files | ||
.idea | ||
*.iml | ||
|
||
# Kubernetes config properties | ||
*.properties.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: api-gateway-cluster-ip-service | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: api-gateway | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |
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,20 @@ | ||
# To configure deployment, | ||
# - copy this file to "config-map.properties.yaml" | ||
# - add config vars | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: api-gateway-config | ||
data: | ||
ANNOTATION_API_HOST: | ||
ENTITY_API_HOST: | ||
ENTITY_MANAGEMENT_HOST: | ||
FULLTEXT_API_HOST: | ||
MANIFEST_API_HOST: | ||
OAI_RECORD_HOST: | ||
RECOMMENDATION_API_HOST: | ||
RESOLVER_ADDRESS: | ||
ROOT_REDIRECT_URL: | ||
SEARCH_API_HOST: | ||
SET_API_HOST: | ||
THUMBNAIL_API_HOST: |
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,22 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: api-gateway-deployment | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: api-gateway | ||
template: | ||
metadata: | ||
labels: | ||
app: api-gateway | ||
spec: | ||
containers: | ||
- name: api-gateway | ||
image: europeana/api-gateway | ||
ports: | ||
- containerPort: 80 | ||
envFrom: | ||
- configMapRef: | ||
name: api-gateway-config |
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,27 @@ | ||
# Ingress for routing traffic on IBM cloud. | ||
# To configure, | ||
# - copy this file to "ingress.properties.yaml" | ||
# - replace HOSTNAME and SECRET_NAME placeholders with correct values | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: api-gateway-ingress | ||
annotations: | ||
cert-manager.io/issuer: letsencrypt-production | ||
spec: | ||
ingressClassName: public-iks-k8s-nginx | ||
tls: | ||
- hosts: | ||
- HOSTNAME | ||
secretName: SECRET_NAME | ||
rules: | ||
- host: HOSTNAME | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: api-gateway-cluster-ip-service | ||
port: | ||
number: 80 |
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,15 @@ | ||
# NodePort service for accessing API locally. Use ingress for IBM cloud deployments | ||
# API can be accessed on http://<cluster-ip>:31000 | ||
# For Docker Desktop, cluster-ip is "localhost"; | ||
# if using Minikube, run "minikube ip" to get IP address of your cluster | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: api-gateway-node-port | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
nodePort: 31000 | ||
selector: | ||
app: api-gateway |
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