scripts/create_container: fix cockroachdb startup
After moving the build container to --net=host this broke building //...
(as sqlboiler touches a local crdb in order to generate SQL
boilerplate...). This moves cockroachdb to also run with --net=host, and
fixes the advertisement address in the same way as it's fixed in
run_ci.sh.
Test Plan: tested this locally :/
X-Origin-Diff: phab/D562
GitOrigin-RevId: 25aee769a555d34ae3c9f12560a8a29986601034
diff --git a/core/internal/kubernetes/scheduler.go b/core/internal/kubernetes/scheduler.go
index d3ee20b..e3be0a0 100644
--- a/core/internal/kubernetes/scheduler.go
+++ b/core/internal/kubernetes/scheduler.go
@@ -26,6 +26,7 @@
"go.etcd.io/etcd/clientv3"
"git.monogon.dev/source/nexantic.git/core/internal/common/supervisor"
+ "git.monogon.dev/source/nexantic.git/core/internal/kubernetes/pki"
"git.monogon.dev/source/nexantic.git/core/pkg/fileargs"
)
@@ -38,11 +39,11 @@
func getPKISchedulerConfig(consensusKV clientv3.KV) (*schedulerConfig, error) {
var config schedulerConfig
var err error
- config.serverCert, config.serverKey, err = getCert(consensusKV, "scheduler")
+ config.serverCert, config.serverKey, err = pki.GetCert(consensusKV, "scheduler")
if err != nil {
return nil, fmt.Errorf("failed to get scheduler serving certificate: %w", err)
}
- config.kubeConfig, err = getSingle(consensusKV, "scheduler.kubeconfig")
+ config.kubeConfig, err = pki.GetSingle(consensusKV, "scheduler.kubeconfig")
if err != nil {
return nil, fmt.Errorf("failed to get scheduler kubeconfig: %w", err)
}