Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Update label selector for instance index env injector
Browse files Browse the repository at this point in the history
Also:
* update labels/annotations for jobs (to be consistent with PR #17)
* update the README

Co-authored-by: Mario Nitchev <[email protected]>
  • Loading branch information
danail-branekov and mnitchev committed Nov 18, 2021
1 parent a8f2d26 commit 309b9c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ so if you want to access your LRP you have to do it from within the cluster or
use [telepresence](https://www.telepresence.io/).

```
POD_IP=$(kubectl get pod -n cf-workloads --selector=cloudfoundry.org/source_type=APP -o jsonpath="{.items[0].status.podIP}")
POD_IP=$(kubectl get pod -n cf-workloads --selector=workloads.cloudfoundry.org/source-type=APP -o jsonpath="{.items[0].status.podIP}")
telepresence --run curl http://$POD_IP:8080/ 2>/dev/null
```

Expand All @@ -98,5 +98,5 @@ EOF
In order to see the greeting message, run the following command

```
kubectl logs -n cf-workloads --selector=cloudfoundry.org/source_type=TASK
kubectl logs -n cf-workloads --selector=workloads.cloudfoundry.org/source-type=TASK
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ webhooks:
- name: instance-index-env-injector.eirini.cloudfoundry.org
objectSelector:
matchLabels:
cloudfoundry.org/source_type: APP
workloads.cloudfoundry.org/source-type: APP
rules:
- apiGroups: [""]
apiVersions: ["v1"]
Expand Down
12 changes: 6 additions & 6 deletions k8s/jobs/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import (
const (
TaskSourceType = "TASK"

AnnotationGUID = "cloudfoundry.org/guid"
AnnotationGUID = "workloads.cloudfoundry.org/guid"
AnnotationAppName = stset.AnnotationAppName
AnnotationAppID = stset.AnnotationAppID
AnnotationOrgName = stset.AnnotationOrgName
AnnotationOrgGUID = stset.AnnotationOrgGUID
AnnotationSpaceName = stset.AnnotationSpaceName
AnnotationSpaceGUID = stset.AnnotationSpaceGUID
AnnotationTaskContainerName = "cloudfoundry.org/opi-task-container-name"
AnnotationTaskCompletionReportCounter = "cloudfoundry.org/task_completion_report_counter"
AnnotationCCAckedTaskCompletion = "cloudfoundry.org/cc_acked_task_completion"
AnnotationTaskContainerName = "workloads.cloudfoundry.org/opi-task-container-name"
AnnotationTaskCompletionReportCounter = "workloads.cloudfoundry.org/task_completion_report_counter"
AnnotationCCAckedTaskCompletion = "workloads.cloudfoundry.org/cc_acked_task_completion"

LabelGUID = stset.LabelGUID
LabelName = "cloudfoundry.org/name"
LabelName = "workloads.cloudfoundry.org/name"
LabelAppGUID = stset.LabelAppGUID
LabelSourceType = stset.LabelSourceType
LabelTaskCompleted = "cloudfoundry.org/task_completed"
LabelTaskCompleted = "workloads.cloudfoundry.org/task_completed"

TaskCompletedTrue = "true"
PrivateRegistrySecretGenerateName = stset.PrivateRegistrySecretGenerateName
Expand Down

0 comments on commit 309b9c2

Please sign in to comment.