Skip to content

Commit

Permalink
✨(forum) add static service for elastic search
Browse files Browse the repository at this point in the history
Add a static service for the forum elasticsearch, to be used easily by
other applications.
  • Loading branch information
madmatah committed Jan 14, 2020
1 parent 14442a8 commit b655429
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Versioning](http://semver.org/spec/v2.0.0.html).
### Added

- Introduce static services to expose services to other apps with a fixed name
- Add a static service for the elasticsearch forum

### Fixed

Expand Down
24 changes: 24 additions & 0 deletions apps/forum/templates/services/elasticsearch/static-svc.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: forum
service: elasticsearch
version: "{{ forum_elasticsearch_image_tag }}"
deployment_stamp: "{{ deployment_stamp }}"
service_prefix: "{{ prefix }}"
type: static-service
removable: "no"
# name of the service should be database host name in settings
name: "{{ forum_elasticsearch_host }}-{{ prefix }}"
namespace: "{{ project_name }}"
spec:
ports:
- name: {{ forum_elasticsearch_port }}-tcp
port: {{ forum_elasticsearch_port }}
protocol: TCP
targetPort: {{ forum_elasticsearch_port }}
selector:
app: forum
deploymentconfig: "forum-elasticsearch-{{ deployment_stamp | default('undefined', true) }}"
type: ClusterIP

0 comments on commit b655429

Please sign in to comment.