Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jgf: refactor to use shared functions and fix containment #76

Merged
merged 6 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ^1.19
go-version: ^1.21

- name: Build Containers
run: |
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ^1.19
go-version: ^1.21

- name: Build Container
run: |
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ^1.19
go-version: ^1.21

- name: Download fluence artifact
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion src/fluence/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func main() {

// Fluxion GRPC
flux := fluxion.Fluxion{}
flux.InitFluxion(policy, label)
flux.InitFluxion(*policy, *label)

lis, err := net.Listen("tcp", port)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions src/fluence/fluxion/fluxion.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ type Fluxion struct {
}

// InitFluxion creates a new client to interaction with the fluxion API (via go bindings)
func (fluxion *Fluxion) InitFluxion(policy *string, label *string) {
func (fluxion *Fluxion) InitFluxion(policy string, label string) {
vsoch marked this conversation as resolved.
Show resolved Hide resolved
fluxion.cli = fluxcli.NewReapiClient()

klog.Infof("[Fluence] Created flux resource client %s", fluxion.cli)
err := utils.CreateJGF(defaults.KubernetesJsonGraphFormat, label)
err := utils.CreateInClusterJGF(defaults.KubernetesJsonGraphFormat, label)
if err != nil {
return
}
Expand All @@ -36,8 +36,8 @@ func (fluxion *Fluxion) InitFluxion(policy *string, label *string) {
}

p := "{}"
if *policy != "" {
p = string("{\"matcher_policy\": \"" + *policy + "\"}")
if policy != "" {
p = string("{\"matcher_policy\": \"" + policy + "\"}")
klog.Infof("[Fluence] match policy: %s", p)
}
fluxion.cli.InitContext(string(jgf), p)
Expand Down
Loading
Loading