Skip to content

Commit

Permalink
update-refs (#101)
Browse files Browse the repository at this point in the history
* Updated radix-operator version

* Cleanup
  • Loading branch information
satr authored Jul 26, 2024
1 parent f0cc40c commit a8e1249
Show file tree
Hide file tree
Showing 14 changed files with 485 additions and 40 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ permissions:
jobs:

build:

runs-on: ubuntu-latest

strategy:
matrix:
arch: [ arm64 ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -32,7 +33,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.21'

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ permissions:
jobs:

build:

runs-on: ubuntu-latest

strategy:
matrix:
arch: [ arm64 ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -40,6 +41,9 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ arm64 ]
steps:
- uses: actions/checkout@v4
with:
Expand Down
6 changes: 5 additions & 1 deletion cmd/logsEnvironment.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ import (

apiclient "github.com/equinor/radix-cli/generated-client/client"
"github.com/equinor/radix-cli/generated-client/client/environment"
"github.com/equinor/radix-cli/generated-client/models"
"github.com/equinor/radix-cli/pkg/client"
"github.com/equinor/radix-cli/pkg/flagnames"
"github.com/equinor/radix-cli/pkg/settings"
"github.com/equinor/radix-common/utils/slice"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -87,7 +89,9 @@ func getComponentReplicasForEnvironment(apiClient *apiclient.Radixapi, appName,
componentReplicas := make(map[string][]string)
for _, component := range environmentDetails.Payload.ActiveDeployment.Components {
if component.Name != nil {
componentReplicas[*component.Name] = component.Replicas
componentReplicas[*component.Name] = slice.Reduce(component.ReplicaList, make([]string, 0), func(acc []string, replica *models.ReplicaSummary) []string {
return append(acc, *replica.Name)
})
}
}

Expand Down
6 changes: 5 additions & 1 deletion cmd/logsEnvironmentComponent.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ import (
apiclient "github.com/equinor/radix-cli/generated-client/client"
"github.com/equinor/radix-cli/generated-client/client/component"
"github.com/equinor/radix-cli/generated-client/client/environment"
"github.com/equinor/radix-cli/generated-client/models"
"github.com/equinor/radix-cli/pkg/client"
"github.com/equinor/radix-cli/pkg/flagnames"
"github.com/equinor/radix-cli/pkg/settings"
"github.com/equinor/radix-cli/pkg/utils/log"
"github.com/equinor/radix-common/utils/slice"
"github.com/go-openapi/strfmt"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -161,7 +163,9 @@ func getReplicasForComponent(apiClient *apiclient.Radixapi, appName, environment
for _, comp := range environmentDetails.Payload.ActiveDeployment.Components {
if comp.Name != nil &&
*comp.Name == componentName {
replicas = comp.Replicas
replicas = slice.Reduce(comp.ReplicaList, make([]string, 0), func(acc []string, replica *models.ReplicaSummary) []string {
return append(acc, *replica.Name)
})
break
}
}
Expand Down
53 changes: 52 additions & 1 deletion generated-client/models/component.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions generated-client/models/component_summary.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a8e1249

Please sign in to comment.