Skip to content

Commit

Permalink
Split services apart
Browse files Browse the repository at this point in the history
  • Loading branch information
jharmison-redhat committed Feb 17, 2021
1 parent ff3e3c3 commit 4309314
Showing 1 changed file with 38 additions and 20 deletions.
58 changes: 38 additions & 20 deletions roles/gitea-ocp/templates/service.yml.j2
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
kind: Service
apiVersion: v1
metadata:
name: "{{ _gitea_name }}"
namespace: "{{ _gitea_namespace }}"
labels:
app: "{{ _gitea_name }}"
spec:
selector:
app: "{{ _gitea_name }}"
ports:
- name: gitea
port: 3000
protocol: TCP
targetPort: 3000
- name: gitea-ssh
port: 2022
protocol: TCP
targetPort: 2022
sessionAffinity: None
kind: List
items:
- kind: Service
apiVersion: v1
metadata:
name: "{{ _gitea_name }}"
namespace: "{{ _gitea_namespace }}"
labels:
app: "{{ _gitea_name }}"
spec:
selector:
app: "{{ _gitea_name }}"
ports:
- name: gitea
port: 3000
protocol: TCP
targetPort: 3000
sessionAffinity: None
type: ClusterIP
{% if _gitea_external_ssh|bool %}
type: LoadBalancer
- kind: Service
apiVersion: v1
metadata:
name: "{{ _gitea_name }}-ssh"
namespace: "{{ _gitea_namespace }}"
labels:
app: "{{ _gitea_name }}"
spec:
selector:
app: "{{ _gitea_name }}"
ports:
- name: gitea-ssh
port: 2022
protocol: TCP
targetPort: 2022
sessionAffinity: None
type: LoadBalancer
{% endif %}
metadata:
resourceVersion: ""

0 comments on commit 4309314

Please sign in to comment.