Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/App/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ let main argv =
{ kube = kube
kubeCfg = clean.KubeConfig
destination = Destination("destination")
missionName = "Clean"
image = "stellar/stellar-core"
oldImage = None
netdelayImage = ""
Expand Down Expand Up @@ -799,6 +800,7 @@ let main argv =
{ MissionContext.kube = kube
kubeCfg = mission.KubeConfig
destination = destination
missionName = m
image = mission.Image
oldImage = mission.OldImage
netdelayImage = mission.netdelayImage
Expand Down
1 change: 1 addition & 0 deletions src/FSLibrary.Tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ let ctx : MissionContext =
{ kube = null
kubeCfg = ""
destination = Destination(System.IO.Path.GetTempPath())
missionName = "Tests"
image = "stellar/stellar-core"
oldImage = None
netdelayImage = ""
Expand Down
6 changes: 4 additions & 2 deletions src/FSLibrary/StellarKubeSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ type NetworkCfg with
member self.NamespacedMeta(name: string) : V1ObjectMeta =
V1ObjectMeta(name = name, labels = CfgVal.labels, namespaceProperty = self.NamespaceProperty)

member self.PodLabels() : Map<string, string> = Map.add "mission" self.missionContext.missionName CfgVal.labels

member self.Affinity() : V1Affinity option =
let require = List.map requireNodeLabel self.missionContext.requireNodeLabels
let avoid = List.map avoidNodeLabel self.missionContext.avoidNodeLabels
Expand Down Expand Up @@ -667,7 +669,7 @@ type NetworkCfg with
),
metadata =
V1ObjectMeta(
labels = CfgVal.labels,
labels = self.PodLabels(),
annotations = annotations,
namespaceProperty = self.NamespaceProperty
)
Expand Down Expand Up @@ -778,7 +780,7 @@ type NetworkCfg with
spec = podSpec,
metadata =
V1ObjectMeta(
labels = CfgVal.labels,
labels = self.PodLabels(),
annotations = annotations,
namespaceProperty = self.NamespaceProperty
)
Expand Down
1 change: 1 addition & 0 deletions src/FSLibrary/StellarMissionContext.fs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type MissionContext =
{ kube: Kubernetes
kubeCfg: string
destination: Destination
missionName: string
image: string
oldImage: string option
netdelayImage: string
Expand Down