Skip to content

Commit

Permalink
Add labels identifying workshop and registry pods for workshop session.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed May 20, 2022
1 parent 5f3efc0 commit 1d09571
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions session-manager/handlers/workshopsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ def resolve_security_policy(name):
"namespace": workshop_namespace,
"labels": {
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "workshop",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand All @@ -1149,6 +1150,7 @@ def resolve_security_policy(name):
"labels": {
"deployment": session_namespace,
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "workshop",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand Down Expand Up @@ -1896,6 +1898,7 @@ def _apply_environment_patch(patch):
"namespace": workshop_namespace,
"labels": {
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "registry",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand All @@ -1914,6 +1917,7 @@ def _apply_environment_patch(patch):
"labels": {
"deployment": f"{session_namespace}-registry",
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "registry",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand Down Expand Up @@ -2033,6 +2037,7 @@ def _apply_environment_patch(patch):
"namespace": workshop_namespace,
"labels": {
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "registry",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand All @@ -2055,6 +2060,7 @@ def _apply_environment_patch(patch):
"annotations": {"nginx.ingress.kubernetes.io/proxy-body-size": "512m"},
"labels": {
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "registry",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand Down Expand Up @@ -2135,6 +2141,7 @@ def _apply_environment_patch(patch):
"namespace": workshop_namespace,
"labels": {
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "workshop",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand Down Expand Up @@ -2238,6 +2245,7 @@ def _apply_environment_patch(patch):
},
"labels": {
f"training.{OPERATOR_API_GROUP}/component": "session",
f"training.{OPERATOR_API_GROUP}/application": "workshop",
f"training.{OPERATOR_API_GROUP}/workshop.name": workshop_name,
f"training.{OPERATOR_API_GROUP}/portal.name": portal_name,
f"training.{OPERATOR_API_GROUP}/environment.name": environment_name,
Expand Down

0 comments on commit 1d09571

Please sign in to comment.