小编Ram*_*eza的帖子

导入带有 LFS 对象的 golang 模块

我需要将带有 LFS 对象的模块导入到我的 go 项目中。我已经将模块添加到go.mod,但是当 go 工具将依赖项下载到我的~/go/pkg/...文件夹中时,LFS 对象不会下载。我获取的是 LFS 元数据,而不是完整的对象。这导致我的构建失败。

我已经浏览了go getgo mod文档,但找不到有关此主题的任何内容。到目前为止,我发现的唯一解决方法是手动下载文件 post go mod download,但我正在寻找更官方的解决方案。

git go git-lfs go-modules

5
推荐指数
1
解决办法
920
查看次数

如何在cloudformation堆栈更新期间删除资源而不删除它

我有一个cloudformation模板,它创建一个S3存储桶作为cloudformation堆栈的一部分.在我的模板的新版本上,我计划将我的应用程序从S3迁移到EFS.

有没有办法从模板中删除S3存储桶资源,而不删除它?理想情况下,我希望我的老用户在升级后可以使用s3存储桶,但是对于新用户来说根本没有它.看起来DeletionPolicies在这里可能有所帮助,但是它上面的文档说它只适用于堆栈删除,而不适用于升级.

amazon-web-services aws-cloudformation

3
推荐指数
3
解决办法
3465
查看次数

在 Okteto Cloud 上创建 PersistentVolume

当我尝试使用以下定义在 Okteto Cloud 上创建一个持久卷时:

kind: PersistentVolume
apiVersion: v1
metadata:
  name: postgres-pv
  labels:
    type: local
    app: postgres
spec:
  storageClassName: manual
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteMany
  hostPath:
    path: "/mnt/data"
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=persistentvolumes", GroupVersionKind: "/v1, Kind=PersistentVolume"
Name: "postgres-pv", Namespace: ""
Object: &{map["apiVersion":"v1" "kind":"PersistentVolume" "metadata":map["annotations":map["kubectl.kubernetes.io/last-applied-configuration":""] "labels":map["app":"postgres" "type":"local"] "name":"postgres-pv"] "spec":map["accessModes":["ReadWriteMany"] "capacity":map["storage":"5Gi"] "hostPath":map["path":"/mnt/data"]]]}
from server for: "deploy/k8s.postgres.yml": persistentvolumes "postgres-pv" is forbidden: User "system:serviceaccount:okteto:07e6fdbf-55c2-4642-81e3-051e8309000f" cannot get resource "persistentvolumes" in API group "" at the cluster …
Run Code Online (Sandbox Code Playgroud)

postgresql kubernetes persistent-volumes persistent-volume-claims okteto

2
推荐指数
1
解决办法
547
查看次数