Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ NOTE: all releases may include dependency updates, not specifically mentioned

- feat: integrate try-as library [#912](https://github.com/hypermodeinc/modus/pull/912)
- fix: sentry source context [#940](https://github.com/hypermodeinc/modus/pull/940)
- fix: connect kubernetes logger [#945](https://github.com/hypermodeinc/modus/pull/945)

## 2025-07-09 - Runtime v0.18.4

Expand Down
1 change: 1 addition & 0 deletions runtime/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/docker/go-connections v0.5.0
github.com/fatih/color v1.18.0
github.com/getsentry/sentry-go v0.34.1
github.com/go-logr/zerologr v1.2.3
github.com/go-sql-driver/mysql v1.9.3
github.com/go-viper/mapstructure/v2 v2.3.0
github.com/goccy/go-json v0.10.5
Expand Down
2 changes: 2 additions & 0 deletions runtime/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg=
github.com/go-logr/zerologr v1.2.3 h1:up5N9vcH9Xck3jJkXzgyOxozT14R47IyDODz8LM1KSs=
github.com/go-logr/zerologr v1.2.3/go.mod h1:BxwGo7y5zgSHYR1BjbnHPyF/5ZjVKfKxAZANVu6E8Ho=
github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic=
github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk=
github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ=
Expand Down
7 changes: 5 additions & 2 deletions runtime/secrets/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fmt"
"strings"

"github.com/go-logr/zerologr"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/app"
"github.com/hypermodeinc/modus/runtime/logger"
Expand Down Expand Up @@ -52,7 +53,7 @@ func (sp *kubernetesSecretsProvider) initialize(ctx context.Context) {
sp.secretNamespace = parts[0]
sp.secretName = parts[1]

cli, cache, err := newK8sClientForSecret(sp.secretNamespace, sp.secretName)
cli, cache, err := newK8sClientForSecret(ctx, sp.secretNamespace, sp.secretName)
if err != nil {
const msg = "Failed to initialize Kubernetes client."
sentryutils.CaptureError(ctx, err, msg,
Expand Down Expand Up @@ -157,12 +158,14 @@ func (sp *kubernetesSecretsProvider) hasSecret(ctx context.Context, name string)

// newK8sClientForSecret creates a new Kubernetes client that watches
// only a single secret `name` in namespace `ns`.
func newK8sClientForSecret(ns, name string) (client.Client, pkgcache.Cache, error) {
func newK8sClientForSecret(ctx context.Context, ns, name string) (client.Client, pkgcache.Cache, error) {
scheme := runtime.NewScheme()
if err := clientgoscheme.AddToScheme(scheme); err != nil {
return nil, nil, err
}

ctrl.SetLogger(zerologr.New(logger.Get(ctx)))

cl, err := cluster.New(ctrl.GetConfigOrDie(), func(clusterOptions *cluster.Options) {
clusterOptions.Scheme = scheme
clusterOptions.Cache.DefaultNamespaces = make(map[string]pkgcache.Config)
Expand Down
Loading