Skip to content

Commit

Permalink
properly set resource versions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Oct 12, 2023
1 parent c5bd8d3 commit 892a06b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/pluralsh/deployment-operator/pkg/agent"
"github.com/pluralsh/deployment-operator/pkg/log"
"github.com/pluralsh/deployment-operator/pkg/sync"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/healthz"
Expand Down Expand Up @@ -36,6 +37,7 @@ func main() {
flag.StringVar(&refreshInterval, "refresh-interval", "1m", "Refresh interval duration")
flag.StringVar(&consoleUrl, "console-url", "", "the url of the console api to fetch services from")
flag.StringVar(&deployToken, "deploy-token", "", "the deploy token to auth to console api with")
flag.BoolVar(&sync.Local, "local", false, "whether you're running the operator locally")
opts := zap.Options{
Development: true,
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/sync/status.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package sync

import (
"fmt"

"github.com/argoproj/gitops-engine/pkg/health"
"github.com/argoproj/gitops-engine/pkg/sync/common"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
Expand Down Expand Up @@ -44,6 +46,7 @@ func (engine *Engine) collectComponents(id string, results []common.ResourceSync
}

for _, syncResult := range results {
fmt.Printf("%+v\n", syncResult)
component := fromSyncResult(syncResult)
obj, ok := liveObjs[syncResult.ResourceKey]
if ok {
Expand Down Expand Up @@ -83,6 +86,7 @@ func fromSyncResult(res common.ResourceSyncResult) *console.ComponentAttributes
Kind: rk.Kind,
Namespace: rk.Namespace,
Name: rk.Name,
Version: res.Version,
Synced: res.Status == common.ResultCodeSynced,
}
}
Expand Down

0 comments on commit 892a06b

Please sign in to comment.