Argo CD 搭配 Kustomize 實作 GitOps 部署 周育緯
Argo CD 搭配 Kustomize 實作 GitOps 部署 周育緯 1 About me •III DevOps contributor •8 年 System, DevOps 與 Backend 開發與 維護經驗 •資展國際、工研院: Kubernetes, DevOps 講師 2 GitOps •雲原生 Continuous Deployment •所有部署都使用聲明式(declarative)腳本 •需要維護5份yaml files •一份deployment yaml在用sed replace嗎? •容易出錯 •把他打包成Helm chart嗎?在帶入variable 嗎? •複雜度過高 7 Kustomize •讓無模板的yaml可以支援多種用途 •CNCF special interest groups (SIGs) 贊助 •Kubernetes 1.14版開始支援 8 Sample Repoitory kustomization.yaml 15 用patch替換dev 使用的image tag 16 Kustomize Comand •kubectl kustomize {放置 kustomization.yaml 的資料夾名稱} •生成替換掉或增加參數的yaml •kubectl kustomize overlay/development 17 18 19 Use generate YAML0 码力 | 24 页 | 696.06 KB | 1 年前3The Path to GitOps
Pulumi Kubernetes Operator Summary 18 Chapter 3–Templating Everything in Git Kustomize Helm Operators Combining Tools Summary The Path to GitOps | 3 Contents 22 Chapter also work with Helm [2.2] and Kustomize [2.3] to render the YAML produced by those tools before applying them to the Kubernetes cluster. (We’ll look at Helm and Kustomize more closely in upcoming chapters GitOps Toolkit, and were based on controllers. These components include the source controller, the Kustomize controller, the Helm controller, the notification controller, and the image automation controller0 码力 | 45 页 | 1.09 MB | 1 年前3What's new with GitOps and OpenShift
triggered from Git Tools of the Trade https://argoproj.github.io/argo-cd https://kustomize.io/ Argo CD Kustomize Argo CD - What is It? Argo CD is a declarative, GitOps continuous delivery tool state with git repos ● Works with a variety of Kubernetes deployment tools including: ○ Helm ○ Kustomize ○ Ksonnet/Jsonnet ○ Directories of yaml ● It is not a CI tool What is an Argo CD Application into it ○ Deploy required infrastructure before application (try to avoid this) ● Tools like kustomize and helm will handle this automatically in some cases ● Argo CD provides Sync Phases and Waves0 码力 | 34 页 | 2.01 MB | 1 年前3OpenShift Container Platform 4.10 CLI 工具
--from=registry.io/repo/image --all --confirm OpenShift Container Platform 4.10 CLI 工具 工具 48 2.5.1.81. oc kustomize 从目录或 URL 构建 kustomization 目标。 用法示例 用法示例 2.5.1.82. oc label 更新资源上的标签 用法示例 用法示例 2.5.1.83. oc directory oc kustomize # Build some shared configuration directory oc kustomize /home/config/production # Build from github oc kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld Operator 项目生成一组捆绑包清单、元数据和 bundle.Dockerfile 文 件。 注意 注意 通常,您首先运行 generate kustomize manifests 子命令来生成由 generate bundle 子 命令使用的输入 Kustomize 基础。但是,您可以使用初始项目中的 make bundle 命令按 顺序自动运行这些命令。 表 表 7.6. generate bundle0 码力 | 120 页 | 1.04 MB | 1 年前3OpenShift Container Platform 4.13 CLI 工具
existing image stream oc import-image mystream 第 第 2 章 章 OPENSHIFT CLI (OC) 53 2.7.1.83. oc kustomize 从目录或 URL 构建 kustomization 目标。 用法示例 用法示例 2.7.1.84. oc label 更新资源上的标签 用法示例 用法示例 # Update imported directory oc kustomize # Build some shared configuration directory oc kustomize /home/config/production # Build from github oc kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld Operator 项目生成一组捆绑包清单、元数据和 bundle.Dockerfile 文 件。 注意 注意 通常,您首先运行 generate kustomize manifests 子命令来生成由 generate bundle 子 命令使用的输入 Kustomize 基础。但是,您可以使用初始项目中的 make bundle 命令按 顺序自动运行这些命令。 表 表 7.6. generate bundle0 码力 | 128 页 | 1.11 MB | 1 年前3OpenShift Container Platform 4.8 CLI 工具
OPENSHIFT CLI (OC) 47 2.5.1.81. oc import-image 从容器镜像 registry 中导入镜像 用法示例 用法示例 2.5.1.82. oc kustomize 从目录或 URL 构建 kustomization 目标。 用法示例 用法示例 # Copy manifest list of a multi-architecture image mystream --from=registry.io/repo/image --all --confirm # Build the current working directory oc kustomize OpenShift Container Platform 4.8 CLI 工具 工具 48 2.5.1.83. oc label 更新资源上的标签 用法示例 用法示例 2.5.1 Build some shared configuration directory oc kustomize /home/config/production # Build from github oc kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld?ref=v1.0.6 # Update0 码力 | 152 页 | 1.24 MB | 1 年前3OpenShift Container Platform 4.14 Operator
memcached-sample app.kubernetes.io/part-of: memcached-operator app.kubernetes.io/managed-by: kustomize app.kubernetes.io/created-by: memcached-operator name: memcached-sample spec: size: 3 OpenShift ${OPERATOR_IMAGE:-""} operator_pull_policy: ${OPERATOR_PULL_POLICY:-"Always"} kustomize: ${KUSTOMIZE_PATH:-kustomize} env: K8S_AUTH_KUBECONFIG: ${KUBECONFIG:-"~/.kube/config"} verifier: make run 命令: 输出示例 出示例 现在,Operator 会监控 CR 的事件,创建 CR 将触发您的 Ansible 角色运行。 $ make install /usr/bin/kustomize build config/crd | kubectl apply -f - customresourcedefinition.apiextensions.k8s.io/memcacheds.cache0 码力 | 423 页 | 4.26 MB | 1 年前3Rafay DZone Refcard Gitops for kubernetes 2022
yaml #Required ``` KUSTOMIZE Apart from the Parameterized Templating, another approach to manage is Overlay Configuration. Kustomize is a configuration management tool based based on this approach one. Kustomize works off a concept of “where, what, and how” to refactor specific Kubernetes manifests. The “where” to refactor/change are the base manifests, e.g., a deployment replica count, volume mounts, etc. The “how” to change are the kustomization/config files. Kustomize file structure example: ├── base │ ├── deployment.yaml │ ├── kustomization.yaml └── overlays0 码力 | 8 页 | 1.35 MB | 1 年前3Continuous Delivery and GitOps on OpenShift
complex rollouts ● Rollback and rollforward to any Git commit ● Manifest templating support (Helm, Kustomize, etc) ● Visual insight into sync status and history OPENSHIFT GITOPS 29 An application scoped Configures webhooks for Tekton Pipelines for CI ● Configures Argo CD for deployment to environments ● Kustomize for environment-specific configs ● Integration with secret managers $ kam bootstrap $ kam environment0 码力 | 32 页 | 2.13 MB | 1 年前3OpenShift Container Platform 4.10 可伸缩性和性能
Transition Time: 2021-11-26T17:21:39Z Message: rpc error: code = Unknown desc = `kustomize build /tmp/https___git.com/ran-sites/siteconfigs/ --enable-alpha-plugins` failed exit status 1: Transition Time: 2021-11-26T17:21:39Z Message: rpc error: code = Unknown desc = `kustomize build /tmp/https___git.com/ran-sites/policies/ --enable-alpha-plugins` failed exit status 1: 2021/11/26 io/openshift4/ztp-site-generate-rhel8:v4.10 ADD example-cr2.yaml /kustomize/plugin/ran.openshift.io/v1/policygentemplate/source-crs/ ADD example-cr1.yaml /kustomize/plugin/ran.openshift.io/v1/policygentemplate/source-crs/0 码力 | 315 页 | 3.19 MB | 1 年前3
共 11 条
- 1
- 2