我正在学习如何使用 Pulumi,我想知道我可以正确配置 pulumi 以将图像推送到 GCR。我有以下内容index.ts
const appImage = new docker.Image("ledgerImage", {
imageName: 'us.gcr.io/qwil-build/ledger',
build: "../../",
});
当我运行时,pulumi preview
我看到图像已成功构建:
2:51PM /Users/paymahn/qwil/ledger/pulumi/infra pulumi ⬆ ⬇ ◼
❮❮❮ pulumi preview
Previewing update (qwil/dev):
Type Name Plan Info
+ pulumi:pulumi:Stack ledger-dev create 1 message
+ ├─ docker:image:Image ledgerImage create
+ ├─ gcp:compute:Address cloud-sql-private-ip create
+ ├─ kubernetes:core:Service ledger create
+ ├─ gcp:servicenetworking:Connection private_vpc create
+ ├─ gcp:sql:DatabaseInstance ledger_db create
+ ├─ gcp:sql:SslCert clientCert create
+ ├─ gcp:sql:User master create
+ ├─ kubernetes:core:Secret ledger-db-tls create
+ └─ kubernetes:extensions:Deployment ledger create 1 warning
Diagnostics:
pulumi:pulumi:Stack (ledger-dev):
kubernetes:extensions:Deployment (ledger):
warning: extensions/v1beta1/Deployment is not supported by Kubernetes 1.16+ clusters. Use apps/v1/Deployment instead.
Resources:
+ 10 to create
Permalink: https://app.pulumi.com/qwil/ledger/dev/previews/3f96f06f-ba49-4f52-91db-2884389a6b62
但是,当我访问永久链接时,我在映像构建步骤最后的 Diff Log 视图中看到以下输出:Successfully pushed to docker
. 当我访问我们的私人 GCR 存储库时,我看不到图像的任何更新/新推送。
我的问题是:
- 普鲁米预览时是否推送图片?
- 推送时,pulumi 是否根据镜像名称来决定仓库?
- 如果是,为什么我的预览输出显示图像已推送到 docker?