Revert "Add name in ports service & remove ownerId (#484)"

This reverts commit 32107f8449.
This commit is contained in:
Romain GERARD
2021-11-17 09:51:50 +01:00
parent abb8abf939
commit 449cb34cfb
17 changed files with 51 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ metadata:
name: {{ sanitized_name }}
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
@@ -21,12 +22,14 @@ spec:
{% endif %}
selector:
matchLabels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
template:
metadata:
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
@@ -64,7 +67,6 @@ spec:
{%- if private_port %}
ports:
- containerPort: {{ private_port }}
name: "p{{ private_port }}"
protocol: TCP
readinessProbe:
tcpSocket:

View File

@@ -5,6 +5,7 @@ metadata:
name: {{ sanitized_name }}-default
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
appId: {{ id }}
app: {{ sanitized_name }}
envId: {{ environment_id }}
@@ -14,6 +15,7 @@ spec:
matchLabels:
appId: {{ id }}
app: {{ sanitized_name }}
ownerId: {{ owner_id }}
envId: {{ environment_id }}
policyTypes:
- Ingress
@@ -24,6 +26,7 @@ metadata:
name: {{ sanitized_name }}-app-access
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
appId: {{ id }}
app: {{ sanitized_name }}
envId: {{ environment_id }}
@@ -33,12 +36,14 @@ spec:
matchLabels:
appId: {{ id }}
app: {{ sanitized_name }}
ownerId: {{ owner_id }}
envId: {{ environment_id }}
ingress:
# Allow ingress from same environment
- from:
- podSelector:
matchLabels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
# Allow ingress from everywhere but only to application port
@@ -71,6 +76,7 @@ metadata:
name: {{ sanitized_name }}-deny-aws-metadata-server
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
appId: {{ id }}
app: {{ sanitized_name }}
envId: {{ environment_id }}
@@ -79,6 +85,7 @@ spec:
matchLabels:
appId: {{ id }}
app: {{ sanitized_name }}
ownerId: {{ owner_id }}
envId: {{ environment_id }}
egress:
- to:

View File

@@ -6,6 +6,7 @@ metadata:
name: {{ sanitized_name }}
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
@@ -13,6 +14,7 @@ spec:
minAvailable: 1
selector:
matchLabels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}

View File

@@ -5,6 +5,7 @@ metadata:
name: {{ sanitized_name }}
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}

View File

@@ -5,6 +5,7 @@ metadata:
name: {{ sanitized_name }}
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
appId: {{ id }}
app: {{ sanitized_name }}
envId: {{ environment_id }}
@@ -12,10 +13,10 @@ spec:
type: ClusterIP
ports:
- protocol: TCP
name: "p{{ private_port }}"
port: {{ private_port }}
targetPort: {{ private_port }}
selector:
ownerId: {{ owner_id }}
appId: {{ id }}
app: {{ sanitized_name }}
envId: {{ environment_id }}

View File

@@ -6,6 +6,7 @@ metadata:
name: {{ sanitized_name }}
namespace: {{ namespace }}
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
@@ -16,12 +17,14 @@ spec:
serviceName: {{ sanitized_name }}
selector:
matchLabels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
template:
metadata:
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
@@ -59,7 +62,6 @@ spec:
{%- if private_port %}
ports:
- containerPort: {{ private_port }}
name: "p{{ private_port }}"
protocol: TCP
readinessProbe:
tcpSocket:
@@ -90,6 +92,7 @@ spec:
- metadata:
name: {{ s.id }}
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
app: {{ sanitized_name }}
@@ -109,6 +112,7 @@ spec:
- metadata:
name: {{ s.id }}
labels:
ownerId: {{ owner_id }}
envId: {{ environment_id }}
appId: {{ id }}
diskId: {{ s.id }}