Repository: khuedoan/homelab Branch: master Commit: b7d8037fa876 Files: 218 Total size: 364.0 KB Directory structure: gitextract_plx_vs0m/ ├── .envrc ├── .gitattributes ├── .gitignore ├── .pre-commit-config.yaml ├── .woodpecker/ │ ├── helm-diff.yaml │ └── static-checks.yaml ├── .yamllint.yaml ├── LICENSE.md ├── Makefile ├── README.md ├── apps/ │ ├── actualbudget/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── blog/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── excalidraw/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── homepage/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── jellyfin/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── matrix/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── ollama/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── pairdrop/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── paperless/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ └── secret.yaml │ │ └── values.yaml │ ├── speedtest/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── tailscale/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ ├── role.yaml │ │ │ ├── rolebinding.yaml │ │ │ ├── secret.yaml │ │ │ └── serviceaccount.yaml │ │ └── values.yaml │ └── wireguard/ │ ├── Chart.yaml │ └── values.yaml ├── docs/ │ ├── .gitignore │ ├── concepts/ │ │ ├── certificate-management.md │ │ ├── development-shell.md │ │ ├── pxe-boot.md │ │ ├── secrets-management.md │ │ └── testing.md │ ├── getting-started/ │ │ ├── install-pre-commit-hooks.md │ │ ├── user-onboarding.md │ │ └── vpn-setup.md │ ├── how-to-guides/ │ │ ├── add-or-remove-nodes.md │ │ ├── alternate-dns-setup.md │ │ ├── backup-and-restore.md │ │ ├── disable-dhcp-proxy-in-dnsmasq.md │ │ ├── expose-services-to-the-internet.md │ │ ├── media-management.md │ │ ├── run-commands-on-multiple-nodes.md │ │ ├── single-node-cluster-adjustments.md │ │ ├── troubleshooting/ │ │ │ └── pxe-boot.md │ │ ├── updating-documentation.md │ │ └── use-both-github-and-gitea.md │ ├── index.md │ ├── installation/ │ │ ├── post-installation.md │ │ ├── production/ │ │ │ ├── configuration.md │ │ │ ├── deployment.md │ │ │ ├── external-resources.md │ │ │ └── prerequisites.md │ │ └── sandbox.md │ └── reference/ │ ├── architecture/ │ │ ├── decision-records.md │ │ ├── networking.md │ │ └── overview.md │ ├── changelog.md │ ├── contributing.md │ ├── faq.md │ ├── license.md │ └── roadmap.md ├── external/ │ ├── .gitignore │ ├── Makefile │ ├── main.tf │ ├── modules/ │ │ ├── cloudflare/ │ │ │ ├── main.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ ├── extra-secrets/ │ │ │ ├── main.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ └── ntfy/ │ │ ├── main.tf │ │ ├── variables.tf │ │ └── versions.tf │ ├── namespaces.yml │ ├── terraform.tfvars.example │ ├── variables.tf │ └── versions.tf ├── flake.nix ├── metal/ │ ├── Makefile │ ├── ansible.cfg │ ├── boot.yml │ ├── cluster.yml │ ├── group_vars/ │ │ └── all.yml │ ├── inventories/ │ │ ├── prod.yml │ │ └── stag.yml │ ├── k3d-dev.yaml │ └── roles/ │ ├── automatic_upgrade/ │ │ ├── files/ │ │ │ └── automatic.conf │ │ └── tasks/ │ │ └── main.yml │ ├── cilium/ │ │ ├── defaults/ │ │ │ └── main.yml │ │ ├── tasks/ │ │ │ └── main.yml │ │ └── templates/ │ │ ├── ciliuml2announcementpolicy.yaml │ │ └── ciliumloadbalancerippool.yaml │ ├── k3s/ │ │ ├── defaults/ │ │ │ └── main.yml │ │ ├── files/ │ │ │ └── bin/ │ │ │ └── .gitignore │ │ ├── tasks/ │ │ │ └── main.yml │ │ └── templates/ │ │ ├── config.yaml.j2 │ │ ├── k3s.service.j2 │ │ └── kube-vip.yaml.j2 │ ├── prerequisites/ │ │ └── tasks/ │ │ └── main.yml │ ├── pxe_server/ │ │ ├── defaults/ │ │ │ └── main.yml │ │ ├── files/ │ │ │ ├── data/ │ │ │ │ ├── init-config/ │ │ │ │ │ └── .gitignore │ │ │ │ ├── iso/ │ │ │ │ │ └── .gitignore │ │ │ │ ├── os/ │ │ │ │ │ └── .gitignore │ │ │ │ └── pxe-config/ │ │ │ │ └── .gitignore │ │ │ ├── dnsmasq/ │ │ │ │ └── Dockerfile │ │ │ ├── docker-compose.yml │ │ │ └── http/ │ │ │ └── Dockerfile │ │ ├── tasks/ │ │ │ └── main.yml │ │ └── templates/ │ │ ├── dnsmasq.conf.j2 │ │ ├── grub.cfg.j2 │ │ └── kickstart.ks.j2 │ └── wake/ │ └── tasks/ │ └── main.yml ├── mkdocs.yml ├── platform/ │ ├── dex/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ └── secret.yaml │ │ └── values.yaml │ ├── external-secrets/ │ │ └── Chart.yaml │ ├── gitea/ │ │ ├── Chart.yaml │ │ ├── files/ │ │ │ └── config/ │ │ │ ├── config.yaml │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── main.go │ │ ├── templates/ │ │ │ ├── admin-secret.yaml │ │ │ ├── config-job.yaml │ │ │ └── config-source.yaml │ │ └── values.yaml │ ├── global-secrets/ │ │ ├── Chart.yaml │ │ ├── files/ │ │ │ └── secret-generator/ │ │ │ ├── config.yaml │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── main.go │ │ └── templates/ │ │ ├── clustersecretstore/ │ │ │ ├── clustersecretstore.yaml │ │ │ ├── role.yaml │ │ │ ├── rolebinding.yaml │ │ │ └── serviceaccount.yaml │ │ └── secret-generator/ │ │ ├── configmap.yaml │ │ ├── job.yaml │ │ ├── role.yaml │ │ ├── rolebinding.yaml │ │ └── serviceaccount.yaml │ ├── grafana/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ └── secret.yaml │ │ └── values.yaml │ ├── kanidm/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ ├── certificate.yaml │ │ │ └── issuer.yaml │ │ └── values.yaml │ ├── renovate/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ └── secret.yaml │ │ └── values.yaml │ ├── woodpecker/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ └── secret.yaml │ │ └── values.yaml │ └── zot/ │ ├── Chart.yaml │ ├── templates/ │ │ └── admin-secret.yaml │ └── values.yaml ├── renovate.json5 ├── scripts/ │ ├── argocd-admin-password │ ├── backup │ ├── configure │ ├── get-dns-config │ ├── get-status │ ├── get-wireguard-config │ ├── hacks │ ├── helm-diff │ ├── kanidm-reset-password │ ├── new-service │ ├── onboard-user │ ├── pxe-logs │ └── take-screenshots ├── system/ │ ├── Makefile │ ├── argocd/ │ │ ├── Chart.yaml │ │ ├── values-seed.yaml │ │ └── values.yaml │ ├── bootstrap.yml │ ├── cert-manager/ │ │ ├── Chart.yaml │ │ ├── templates/ │ │ │ └── clusterissuer.yaml │ │ └── values.yaml │ ├── cloudflared/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── external-dns/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── ingress-nginx/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── kured/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── loki/ │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── monitoring-system/ │ │ ├── Chart.yaml │ │ ├── files/ │ │ │ └── webhook-transformer/ │ │ │ └── alertmanager-to-ntfy.jsonnet │ │ ├── templates/ │ │ │ └── configmap.yaml │ │ └── values.yaml │ ├── rook-ceph/ │ │ ├── Chart.yaml │ │ └── values.yaml │ └── volsync-system/ │ └── Chart.yaml └── test/ ├── Makefile ├── benchmark/ │ ├── security/ │ │ └── kube-bench.yaml │ └── storage/ │ ├── dbench-rwo.yaml │ └── dbench-rwx.yaml ├── external_test.go ├── go.mod ├── go.sum ├── integration_test.go ├── smoke_test.go └── tools_test.go ================================================ FILE CONTENTS ================================================ ================================================ FILE: .envrc ================================================ use flake ================================================ FILE: .gitattributes ================================================ external/** -linguist-vendored ================================================ FILE: .gitignore ================================================ .venv/ book/ *.iso *.log *.png *.tgz *kubeconfig.yaml Chart.lock ================================================ FILE: .pre-commit-config.yaml ================================================ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: check-added-large-files - id: check-executables-have-shebangs - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: detect-private-key - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/adrienverge/yamllint rev: v1.27.1 hooks: - id: yamllint - repo: https://github.com/gruntwork-io/pre-commit rev: v0.1.24 hooks: - id: helmlint - id: shellcheck - repo: https://github.com/tofuutils/pre-commit-opentofu rev: v2.1.0 hooks: - id: tofu_fmt ================================================ FILE: .woodpecker/helm-diff.yaml ================================================ when: branch: ${CI_REPO_DEFAULT_BRANCH} matrix: STACK: - system - platform - apps steps: # TODO DRY with nix develop and custom entrypoint https://github.com/woodpecker-ci/woodpecker/pull/2985, # but first we need a Nix cache. See the nix-cache branch for the WIP. diff: image: nixery.dev/shell/git/python3/kubernetes-helm/diffutils/dyff # TODO replace with nix develop commands: - ./scripts/helm-diff --repository "${CI_REPO_CLONE_URL}" --source "${CI_COMMIT_SOURCE_BRANCH}" --target "${CI_COMMIT_TARGET_BRANCH}" --subpath "${STACK}" when: - event: pull_request path: '${STACK}/**' depends_on: [] ================================================ FILE: .woodpecker/static-checks.yaml ================================================ when: branch: ${CI_REPO_DEFAULT_BRANCH} steps: # TODO DRY with nix develop and custom entrypoint https://github.com/woodpecker-ci/woodpecker/pull/2985, # but first we need a Nix cache. See the nix-cache branch for the WIP. tools-versions: image: nixos/nix commands: - echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf # - echo 'trusted-substituters = http://nix-cache.nix-cache' >> /etc/nix/nix.conf # - echo 'substituters = http://nix-cache.nix-cache' >> /etc/nix/nix.conf - nix develop --command make -C test filter=ToolsVersions when: - event: pull_request path: include: - 'flake.*' depends_on: [] pre-commit: image: nixery.dev/shell/git/pre-commit # TODO replace with nix develop commands: - pre-commit run --color=always when: - event: pull_request depends_on: [] ================================================ FILE: .yamllint.yaml ================================================ ignore: | templates/ mkdocs.yml extends: default rules: document-start: disable line-length: disable ================================================ FILE: LICENSE.md ================================================ ### GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. ### Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. ### TERMS AND CONDITIONS #### 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. #### 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. #### 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. #### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. #### 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. #### 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. #### 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. #### 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. #### 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. #### 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. #### 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. #### 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. #### 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. #### 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. #### 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. #### 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. #### 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. #### 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS ### How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands \`show w' and \`show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: Makefile ================================================ .POSIX: .PHONY: * .EXPORT_ALL_VARIABLES: KUBECONFIG = $(shell pwd)/metal/kubeconfig.yaml KUBE_CONFIG_PATH = $(KUBECONFIG) default: metal system external smoke-test post-install clean configure: ./scripts/configure git status metal: make -C metal system: make -C system external: make -C external smoke-test: make -C test filter=Smoke post-install: @./scripts/hacks # TODO maybe there's a better way to manage backup with GitOps? backup: ./scripts/backup --action setup --namespace=actualbudget --pvc=actualbudget-data ./scripts/backup --action setup --namespace=jellyfin --pvc=jellyfin-data restore: ./scripts/backup --action restore --namespace=actualbudget --pvc=actualbudget-data ./scripts/backup --action restore --namespace=jellyfin --pvc=jellyfin-data test: make -C test clean: docker compose --project-directory ./metal/roles/pxe_server/files down docs: mkdocs serve git-hooks: pre-commit install ================================================ FILE: README.md ================================================ # Khue's Homelab **[Features](#features) • [Get Started](#get-started) • [Documentation](https://homelab.khuedoan.com)** [![tag](https://img.shields.io/github/v/tag/khuedoan/homelab?style=flat-square&logo=semver&logoColor=white)](https://github.com/khuedoan/homelab/tags) [![document](https://img.shields.io/website?label=document&logo=gitbook&logoColor=white&style=flat-square&url=https%3A%2F%2Fhomelab.khuedoan.com)](https://homelab.khuedoan.com) [![license](https://img.shields.io/github/license/khuedoan/homelab?style=flat-square&logo=gnu&logoColor=white)](https://www.gnu.org/licenses/gpl-3.0.html) [![stars](https://img.shields.io/github/stars/khuedoan/homelab?logo=github&logoColor=white&color=gold&style=flat-square)](https://github.com/khuedoan/homelab) This project utilizes [Infrastructure as Code](https://en.wikipedia.org/wiki/Infrastructure_as_code) and [GitOps](https://www.weave.works/technologies/gitops) to automate provisioning, operating, and updating self-hosted services in my homelab. It can be used as a highly customizable framework to build your own homelab. > **What is a homelab?** > > Homelab is a laboratory at home where you can self-host, experiment with new technologies, practice for certifications, and so on. > For more information, please see the [r/homelab introduction](https://www.reddit.com/r/homelab/wiki/introduction) and the > [Home Operations Discord community](https://discord.gg/home-operations) (formerly known as [k8s-at-home](https://k8s-at-home.com)). If you encounter an issue, please create [a bug report](https://github.com/khuedoan/homelab/issues/new?template=bug_report.md) (avoid asking for support about issues specific to this project in other communication channels). ## Overview Project status: **ALPHA** This project is still in the experimental stage, and I don't use anything critical on it. Expect breaking changes that may require a complete redeployment. A proper upgrade path is planned for the stable release. More information can be found in [the roadmap](#roadmap) below. ### Hardware ![Hardware](https://user-images.githubusercontent.com/27996771/98970963-25137200-2543-11eb-8f2d-f9a2d45756ef.JPG) - 4 × NEC SFF `PC-MK26ECZDR` (Japanese version of the ThinkCentre M700): - CPU: `Intel Core i5-6600T @ 2.70GHz` - RAM: `16GB` - SSD: `128GB` - TP-Link `TL-SG108` switch: - Ports: `8` - Speed: `1000Mbps` ### Features - [x] Common applications: Gitea, Jellyfin, Paperless... - [x] Automated bare metal provisioning with PXE boot - [x] Automated Kubernetes installation and management - [x] Installing and managing applications using GitOps - [x] Automatic rolling upgrade for OS and Kubernetes - [x] Automatically update apps (with approval) - [x] Modular architecture, easy to add or remove features/components - [x] Automated certificate management - [x] Automatically update DNS records for exposed services - [x] VPN (Tailscale or Wireguard) - [x] Expose services to the internet securely with [Cloudflare Tunnel](https://www.cloudflare.com/products/tunnel/) - [x] CI/CD platform - [x] Private container registry - [x] Distributed storage - [x] Support multiple environments (dev, prod) - [x] Monitoring and alerting - [x] Automated backup and restore - [x] Single sign-on - [x] Infrastructure testing Some demo videos and screenshots are shown here. They can't capture all the project's features, but they are sufficient to get a concept of it. | Demo | | :--: | | [![][deploy-demo]](https://asciinema.org/a/xkBRkwC6e9RAzVuMDXH3nGHp7) | | Deploy with a single command (after updating the configuration files) | | [![][pxe-demo]](https://www.youtube.com/watch?v=y-d7btNNAT8) | | PXE boot | | [![][hubble-demo]][hubble-demo] | | Observe network traffic with Hubble, built on top of [Cilium](https://cilium.io) and eBPF | | [![][homepage-demo]][homepage-demo] | | Homepage powered by... [Homepage](https://gethomepage.dev) | | [![][grafana-demo]][grafana-demo] | | Monitoring dashboard powered by [Grafana](https://grafana.com) | | [![][gitea-demo]][gitea-demo] | | Git server powered by [Gitea](https://gitea.io/en-us) | | [![][matrix-demo]][matrix-demo] | | [Matrix](https://matrix.org/) chat server | | [![][woodpecker-demo]][woodpecker-demo] | | Continuous integration with [Woodpecker CI](https://woodpecker-ci.org) | | [![][argocd-demo]][argocd-demo] | | Continuous deployment with [ArgoCD](https://argoproj.github.io/cd) | | [![][alert-demo]][alert-demo] | | [ntfy](https://ntfy.sh) displaying received alerts | | [![][ai-demo]][ai-demo] | | Self-hosted AI powered by [Ollama](https://ollama.com) (experimental, not very fast because I don't have a GPU) | [deploy-demo]: https://asciinema.org/a/xkBRkwC6e9RAzVuMDXH3nGHp7.svg [pxe-demo]: https://user-images.githubusercontent.com/27996771/157303477-df2e7410-8f02-4648-a86c-71e6b7e89e35.png [hubble-demo]: https://github.com/khuedoan/homelab/assets/27996771/9c6677d0-3564-47c0-852b-24b6a554b4a3 [homepage-demo]: https://github.com/khuedoan/homelab/assets/27996771/d0eaf620-be08-48d8-8420-40bcaa86093b [grafana-demo]: https://github.com/khuedoan/homelab/assets/27996771/ad937b26-e9bc-4761-83ae-1c7f512ea97f [gitea-demo]: https://github.com/khuedoan/homelab/assets/27996771/c245534f-88d9-4565-bde8-b39f60ccee9e [matrix-demo]: https://user-images.githubusercontent.com/27996771/149448510-7163310c-2049-4ccd-901d-f11f605bfc32.png [woodpecker-demo]: https://github.com/khuedoan/homelab/assets/27996771/5d887688-d20a-44c8-8f77-0c625527dfe4 [argocd-demo]: https://github.com/khuedoan/homelab/assets/27996771/527e2529-4fe1-4664-ab8a-b9eb3c492d20 [alert-demo]: https://github.com/khuedoan/homelab/assets/27996771/c922f755-e911-4ca0-9d4a-6e552d387f18 [ai-demo]: https://github.com/khuedoan/homelab/assets/27996771/d77ba511-00b7-47c3-9032-55679a099e70 ### Tech stack
Logo Name Description
Ansible Automate bare metal provisioning and configuration
ArgoCD GitOps tool built to deploy applications to Kubernetes
cert-manager Cloud native certificate management
Cilium eBPF-based Networking, Observability and Security (CNI, LB, Network Policy, etc.)
Cloudflare DNS and Tunnel
Docker Ephemeral PXE server
ExternalDNS Synchronizes exposed Kubernetes Services and Ingresses with DNS providers
Fedora Server Base OS for Kubernetes nodes
Gitea Self-hosted Git service
Grafana Observability platform
Helm The package manager for Kubernetes
K3s Lightweight distribution of Kubernetes
Kanidm Modern and simple identity management platform
Kubernetes Container-orchestration system, the backbone of this project
Loki Log aggregation system
NGINX Kubernetes Ingress Controller
Nix Convenient development shell
ntfy Notification service to send notifications to your phone or desktop
Prometheus Systems monitoring and alerting toolkit
Renovate Automatically update dependencies
Rook Ceph Cloud-Native Storage for Kubernetes
Tailscale VPN without port forwarding
Wireguard Fast, modern, secure VPN tunnel
Woodpecker CI Simple yet powerful CI/CD engine with great extensibility
Zot Registry Private container registry
## Get Started - [Try it out locally](https://homelab.khuedoan.com/installation/sandbox) without any hardware (just 4 commands!) - [Deploy on real hardware](https://homelab.khuedoan.com/installation/production/prerequisites) for production workload ## Roadmap See [roadmap](https://homelab.khuedoan.com/reference/roadmap) and [open issues](https://github.com/khuedoan/homelab/issues) for a list of proposed features and known issues. ## Contributing Any contributions you make are greatly appreciated. Please see [contributing guide](https://homelab.khuedoan.com/reference/contributing) for more information. ## License Copyright © 2020 - 2024 Khue Doan Distributed under the GPLv3 License. See [license page](https://homelab.khuedoan.com/reference/license) or `LICENSE.md` file for more information. ## Acknowledgements References: - [Ephemeral PXE server inspired by Minimal First Machine in the DC](https://speakerdeck.com/amcguign/minimal-first-machine-in-the-dc) - [ArgoCD usage and monitoring configuration in locmai/humble](https://github.com/locmai/humble) - [README template](https://github.com/othneildrew/Best-README-Template) - [Run the same Cloudflare Tunnel across many `cloudflared` processes](https://developers.cloudflare.com/cloudflare-one/tutorials/many-cfd-one-tunnel) - [MAC address environment variable in GRUB config](https://askubuntu.com/questions/1272400/how-do-i-automate-network-installation-of-many-ubuntu-18-04-systems-with-efi-and) - [Official k3s systemd service file](https://github.com/k3s-io/k3s/blob/master/k3s.service) - [Official Cloudflare Tunnel examples](https://github.com/cloudflare/argo-tunnel-examples) - [Initialize GitOps repository on Gitea and integrate with Tekton by RedHat](https://github.com/redhat-scholars/tekton-tutorial/tree/master/triggers) - [SSO configuration from xUnholy/k8s-gitops](https://github.com/xUnholy/k8s-gitops) - [Pre-commit config from k8s-at-home/flux-cluster-template](https://github.com/k8s-at-home/flux-cluster-template) - [Diátaxis technical documentation framework](https://diataxis.fr) - [Official Terratest examples](https://github.com/gruntwork-io/terratest/tree/master/test) - [Self-host an automated Jellyfin media streaming stack](https://zerodya.net/self-host-jellyfin-media-streaming-stack) - [App Template Helm chart by bjw-s](https://bjw-s-labs.github.io/helm-charts/docs/app-template) - [Various application configurations in onedr0p/home-ops](https://github.com/onedr0p/home-ops) Here is a list of the contributors who have helped to improve this project. Big shout-out to them! - [@locmai](https://github.com/locmai) - [@MatthewJohn](https://github.com/MatthewJohn) - [@karpfediem](https://github.com/karpfediem) - [@linhng98](https://github.com/linhng98) - [@elliotblackburn](https://github.com/elliotblackburn) - [@dotdiego](https://github.com/dotdiego) - [@Crimrose](https://github.com/Crimrose) - [@eventi](https://github.com/eventi) - [@Bourne-ID](https://github.com/Bourne-ID) - [@akwan](https://github.com/akwan) - [@trangmaiq](https://github.com/trangmaiq) - [@tangowithfoxtrot](https://github.com/tangowithfoxtrot) - [@raedkit](https://github.com/raedkit) - [@ClashTheBunny](https://github.com/ClashTheBunny) - [@retX0](https://github.com/retX0) - [@zalsader](https://github.com/zalsader) - [@serpro69](https://github.com/serpro69) - [@llajas](https://github.com/llajas) - [@zalsader](https://github.com/zalsader) If you feel you're missing from this list, please feel free to add yourself in a PR. ## Stargazers over time [![Stargazers over time](https://starchart.cc/khuedoan/homelab.svg)](https://starchart.cc/khuedoan/homelab) ================================================ FILE: apps/actualbudget/Chart.yaml ================================================ apiVersion: v2 name: actualbudget version: 0.0.0 dependencies: - name: app-template version: 2.6.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/actualbudget/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: docker.io/actualbudget/actual-server tag: 24.12.0-alpine service: main: ports: http: port: 5006 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &host budget.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http tls: - hosts: - *host secretName: actualbudget-tls-certificate persistence: data: accessMode: ReadWriteOnce size: 1Gi globalMounts: - path: /data ================================================ FILE: apps/blog/Chart.yaml ================================================ apiVersion: v2 name: blog version: 0.0.0 dependencies: - name: app-template version: 2.2.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/blog/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: registry.khuedoan.com/blog tag: latest service: main: ports: http: port: 3000 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod external-dns.alpha.kubernetes.io/target: homelab-tunnel.khuedoan.com external-dns.alpha.kubernetes.io/cloudflare-proxied: 'true' hosts: - host: &host www.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http tls: - hosts: - *host secretName: blog-tls-certificate ================================================ FILE: apps/excalidraw/Chart.yaml ================================================ apiVersion: v2 name: excalidraw version: 0.0.0 dependencies: - name: app-template version: 2.2.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/excalidraw/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: docker.io/excalidraw/excalidraw tag: latest service: main: ports: http: port: 80 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod external-dns.alpha.kubernetes.io/target: homelab-tunnel.khuedoan.com external-dns.alpha.kubernetes.io/cloudflare-proxied: 'true' hosts: - host: &host draw.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http tls: - hosts: - *host secretName: excalidraw-tls-certificate ================================================ FILE: apps/homepage/Chart.yaml ================================================ apiVersion: v2 name: homepage version: 0.0.0 dependencies: - name: app-template version: 2.6.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/homepage/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: ghcr.io/gethomepage/homepage tag: v0.8.8 service: main: ports: http: port: 3000 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &host home.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http tls: - hosts: - *host secretName: homepage-tls-certificate persistence: config: enabled: true type: configMap name: homepage-config globalMounts: - path: /app/config/settings.yaml subPath: settings.yaml - path: /app/config/widgets.yaml subPath: widgets.yaml - path: /app/config/services.yaml subPath: services.yaml - path: /app/config/bookmarks.yaml subPath: bookmarks.yaml configMaps: config: enabled: true data: settings.yaml: | background: https://images.unsplash.com/photo-1502790671504-542ad42d5189?auto=format&fit=crop&w=2560&q=80 cardBlur: md theme: dark headerStyle: boxed hideVersion: true widgets.yaml: | - search: provider: google target: _blank services.yaml: | - Popular: - Matrix: href: https://chat.khuedoan.com description: Chat client icon: element.svg - Jellyfin: href: https://jellyfin.khuedoan.com description: Media system (movies, music, etc.) icon: jellyfin.svg - Jellyseerr: href: https://jellyseerr.khuedoan.com description: Request media icon: jellyseerr.svg - Paperless: href: https://paperless.khuedoan.com description: Document management system icon: paperless.svg - Management: - Transmission: href: https://transmission.khuedoan.com description: Bittorrent client icon: transmission.svg - Prowlarr: href: https://prowlarr.khuedoan.com description: Indexer manager icon: prowlarr.svg - Radarr: href: https://radarr.khuedoan.com description: Movie manager icon: radarr.svg - Sonarr: href: https://sonarr.khuedoan.com description: TV show manager icon: sonarr.svg - Kanidm: href: https://auth.khuedoan.com description: Identity management icon: https://auth.khuedoan.com/pkg/img/logo-square.svg - Development: - Gitea: href: https://git.khuedoan.com description: Git forge icon: gitea.svg - Woodpecker: href: https://ci.khuedoan.com description: Continuous integration icon: woodpecker-ci.svg - ArgoCD: href: https://argocd.khuedoan.com description: Continuous deployment icon: argocd.svg - Registry: href: https://registry.khuedoan.com description: Container registry icon: docker.svg - Grafana: href: https://grafana.khuedoan.com description: Observability dashboards icon: grafana.svg - Utilities: - Excalidraw: href: https://draw.khuedoan.com description: Virtual whiteboard icon: excalidraw.svg - Speedtest: href: https://speedtest.khuedoan.com description: Internal network speed test icon: openspeedtest.png bookmarks.yaml: | - Homelab: - Documentation: - href: https://homelab.khuedoan.com icon: google-docs.svg - Public homelab repository: - href: https://github.com/khuedoan/homelab icon: github.svg - Managed services: - Cloudflare: - href: https://dash.cloudflare.com icon: cloudflare.svg - Terraform Cloud: - href: https://app.terraform.io icon: terraform.svg - Infrastructure: - Router: - href: https://192.168.1.1 icon: router.svg - Proxmox: - href: https://proxmox:8006 icon: proxmox.svg - Google Cloud: - href: https://console.cloud.google.com icon: google-cloud-platform.svg - Oracle Cloud: - href: https://cloud.oracle.com icon: oracle-cloud.svg ================================================ FILE: apps/jellyfin/Chart.yaml ================================================ apiVersion: v2 name: jellyfin version: 0.0.0 dependencies: - name: app-template version: 2.6.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/jellyfin/values.yaml ================================================ app-template: defaultPodOptions: securityContext: fsGroup: 1000 controllers: main: containers: main: image: repository: docker.io/jellyfin/jellyfin tag: 10.8.13 transmission: image: repository: lscr.io/linuxserver/transmission tag: 4.0.5 prowlarr: image: repository: lscr.io/linuxserver/prowlarr tag: 1.13.3 radarr: image: repository: lscr.io/linuxserver/radarr tag: 5.3.6 sonarr: image: repository: lscr.io/linuxserver/sonarr tag: 4.0.2 jellyseerr: image: repository: docker.io/fallenbagel/jellyseerr tag: 1.7.0 service: main: ports: http: port: 8096 protocol: HTTP transmission: port: 9091 protocol: HTTP prowlarr: port: 9696 protocol: HTTP radarr: port: 7878 protocol: HTTP sonarr: port: 8989 protocol: HTTP jellyseerr: port: 5055 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &jellyfinHost jellyfin.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http - host: &transmissionHost transmission.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: transmission - host: &prowlarrHost prowlarr.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: prowlarr - host: &radarrHost radarr.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: radarr - host: &sonarrHost sonarr.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: sonarr - host: &jellyseerrHost jellyseerr.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: jellyseerr tls: - secretName: jellyfin-tls-certificate hosts: - *jellyfinHost - *transmissionHost - *prowlarrHost - *radarrHost - *sonarrHost - *jellyseerrHost persistence: data: accessMode: ReadWriteOnce size: 50Gi advancedMounts: main: main: - path: /config subPath: jellyfin/config - path: /media/movies subPath: movies - path: /media/shows subPath: shows transmission: - path: /config subPath: transmission/config - path: /downloads subPath: transmission/downloads prowlarr: - path: /config subPath: prowlarr/config radarr: - path: /config subPath: radarr/config - path: /downloads/complete subPath: transmission/downloads/complete - path: /movies subPath: movies sonarr: - path: /config subPath: sonarr/config - path: /downloads/complete subPath: transmission/downloads/complete - path: /shows subPath: shows jellyseerr: - path: /app/config subPath: jellyseerr/config ================================================ FILE: apps/matrix/Chart.yaml ================================================ apiVersion: v2 name: elementweb version: 0.0.0 dependencies: - name: elementweb version: 0.0.6 repository: https://locmai.github.io/charts # TODO switch to official chart - name: dendrite version: 0.13.5 repository: https://matrix-org.github.io/dendrite ================================================ FILE: apps/matrix/values.yaml ================================================ elementweb: ingress: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod external-dns.alpha.kubernetes.io/target: "homelab-tunnel.khuedoan.com" external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" hosts: - host: &frontend_host chat.khuedoan.com paths: - path: / pathType: Prefix tls: - secretName: element-tls-certificate hosts: - *frontend_host config: default: base_url: https://matrix.khuedoan.com server_name: khuedoan.com dendrite: dendrite_config: global: server_name: matrix.khuedoan.com ingress: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hostName: matrix.khuedoan.com tls: - hosts: - matrix.khuedoan.com secretName: matrix-tls-certificate postgresql: enabled: true ================================================ FILE: apps/ollama/Chart.yaml ================================================ apiVersion: v2 name: ollama version: 0.0.0 dependencies: - name: app-template version: 2.6.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/ollama/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: docker.io/ollama/ollama tag: 0.1.29 ui: containers: main: image: repository: ghcr.io/open-webui/open-webui tag: latest env: OLLAMA_BASE_URL: http://ollama:11434 service: main: ports: http: port: 11434 protocol: HTTP ui: controller: ui ports: http: port: 8080 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &ollamaHost ollama.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http - host: &uiHost ai.khuedoan.com paths: - path: / pathType: Prefix service: name: ui port: http tls: - hosts: - *ollamaHost - *uiHost secretName: ollama-tls-certificate persistence: data: accessMode: ReadWriteOnce size: 10Gi advancedMounts: main: main: - path: /root/.ollama ================================================ FILE: apps/pairdrop/Chart.yaml ================================================ apiVersion: v2 name: pairdrop version: 0.0.0 dependencies: - name: app-template version: 2.6.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/pairdrop/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: lscr.io/linuxserver/pairdrop tag: 1.10.7 service: main: ports: http: port: 3000 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &host drop.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http tls: - hosts: - *host secretName: pairdrop-tls-certificate ================================================ FILE: apps/paperless/Chart.yaml ================================================ apiVersion: v2 name: paperless version: 0.0.0 dependencies: - name: app-template version: 2.6.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/paperless/templates/secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: {{ .Release.Name }}-secret namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets dataFrom: - extract: key: paperless.admin ================================================ FILE: apps/paperless/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: ghcr.io/paperless-ngx/paperless-ngx tag: 2.5.4 env: PAPERLESS_PORT: 8000 PAPERLESS_ADMIN_USER: admin PAPERLESS_URL: https://paperless.khuedoan.com envFrom: - secret: "{{ .Release.Name }}-secret" redis: image: repository: docker.io/library/redis tag: 7.2.4 service: main: ports: http: port: 8000 protocol: HTTP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &host paperless.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http tls: - hosts: - *host secretName: paperless-tls-certificate persistence: data: accessMode: ReadWriteOnce size: 10Gi advancedMounts: main: main: - path: /usr/src/paperless/data subPath: data - path: /usr/src/paperless/media subPath: media ================================================ FILE: apps/speedtest/Chart.yaml ================================================ apiVersion: v2 name: speedtest version: 0.0.0 dependencies: - name: app-template version: 2.6.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/speedtest/values.yaml ================================================ app-template: controllers: main: containers: main: image: repository: docker.io/openspeedtest/latest tag: latest service: main: ports: http: port: 3000 protocol: HTTP ingress: main: enabled: true className: nginx annotations: nginx.ingress.kubernetes.io/proxy-body-size: 50m cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &host speedtest.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: http tls: - hosts: - *host secretName: speedtest-tls-certificate ================================================ FILE: apps/tailscale/Chart.yaml ================================================ apiVersion: v2 name: tailscale version: 0.0.0 dependencies: - name: app-template version: 3.1.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/tailscale/templates/role.yaml ================================================ # https://github.com/tailscale/tailscale/blob/main/docs/k8s/role.yaml # Copyright (c) Tailscale Inc & AUTHORS # SPDX-License-Identifier: BSD-3-Clause apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: tailscale namespace: {{ .Release.Namespace }} rules: - apiGroups: [""] resources: ["secrets"] verbs: ["create"] - apiGroups: [""] resourceNames: ["tailscale"] resources: ["secrets"] verbs: ["get", "update", "patch"] ================================================ FILE: apps/tailscale/templates/rolebinding.yaml ================================================ # https://github.com/tailscale/tailscale/blob/main/docs/k8s/rolebinding.yaml # Copyright (c) Tailscale Inc & AUTHORS # SPDX-License-Identifier: BSD-3-Clause apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: tailscale namespace: {{ .Release.Namespace }} subjects: - kind: ServiceAccount name: tailscale roleRef: kind: Role name: tailscale apiGroup: rbac.authorization.k8s.io ================================================ FILE: apps/tailscale/templates/secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: tailscale-auth namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets data: - secretKey: TS_AUTHKEY remoteRef: key: external property: tailscale-auth-key ================================================ FILE: apps/tailscale/templates/serviceaccount.yaml ================================================ # https://github.com/tailscale/tailscale/blob/main/docs/k8s/sa.yaml # Copyright (c) Tailscale Inc & AUTHORS # SPDX-License-Identifier: BSD-3-Clause apiVersion: v1 kind: ServiceAccount metadata: name: tailscale namespace: {{ .Release.Namespace }} ================================================ FILE: apps/tailscale/values.yaml ================================================ app-template: serviceAccount: name: tailscale controllers: tailscale: containers: app: image: repository: ghcr.io/tailscale/tailscale tag: latest env: TS_HOSTNAME: homelab-router TS_USERSPACE: false TS_KUBE_SECRET: tailscale TS_ROUTES: 192.168.1.224/27 TS_AUTHKEY: valueFrom: secretKeyRef: name: tailscale-auth key: TS_AUTHKEY securityContext: capabilities: add: - NET_ADMIN ================================================ FILE: apps/wireguard/Chart.yaml ================================================ apiVersion: v2 name: wireguard version: 0.0.0 dependencies: - name: app-template version: 3.5.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: apps/wireguard/values.yaml ================================================ app-template: controllers: wireguard: containers: app: image: repository: lscr.io/linuxserver/wireguard tag: latest env: LOG_CONFS: false USE_COREDNS: true securityContext: capabilities: add: - NET_ADMIN service: wireguard: controller: wireguard type: LoadBalancer ports: http: port: 51820 protocol: UDP persistence: config: type: secret name: "{{ .Release.Name }}-secret" globalMounts: - path: /config/wg_confs rawResources: secret: apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret spec: spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets data: - secretKey: WIREGUARD_PRIVATE_KEY remoteRef: key: external property: wireguard-private-key target: template: data: wg0.conf: | [Interface] Address = 172.16.0.1/32 ListenPort = 51820 PrivateKey = {{ `{{ .WIREGUARD_PRIVATE_KEY }}` }} PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth+ -j MASQUERADE PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth+ -j MASQUERADE # Note that WireGuard will ignore a peer whose public key matches # the interface's private key. So you can distribute a single # list of peers everywhere. # https://lists.zx2c4.com/pipermail/wireguard/2018-December/003703.html # Servers [Peer] # homelab PublicKey = sSAZS1Z3vB7Wx8e2yVqXfeHjgWTa80wnSYoma3mZkiU= AllowedIPs = 172.16.0.1/32, 192.168.1.100/32, 192.168.1.224/27 [Peer] # horus PublicKey = zVwYqwvGn/IL7o6CD84y4/Y/OnRAUl/jw6T7DtNqWGM= Endpoint = horus.khuedoan.com:51820 PersistentKeepalive = 25 AllowedIPs = 172.16.0.2/32 # Clients [Peer] # khuedoan-ryzentower PublicKey = qnDY23ZWUOlCRUmB8anpXH1uzX0A17F1YtQJmVi7GWM= AllowedIPs = 172.16.0.10/32 [Peer] # khuedoan-thinkpadz13 PublicKey = hSVWn2lBasJeueHApQYmYR0s2zNpXrqZX6F8gyEqpy0= AllowedIPs = 172.16.0.11/32 [Peer] # khuedoan-phone PublicKey = nITHFdgTkNZOTWeSWqnGXjgwlCJMKRCnnUsjMx2yp2U= AllowedIPs = 172.16.0.12/32 ================================================ FILE: docs/.gitignore ================================================ mermaid*.js ================================================ FILE: docs/concepts/certificate-management.md ================================================ # Certificate management Certificates are generated and managed by [cert-manager](https://cert-manager.io) with [Let's Encrypt](https://letsencrypt.org). By default certificates are valid for 90 days and will be renewed after 60 days. cert-manager watches `Ingress` resources across the cluster. When you create an `Ingress` with a [supported annotation](https://cert-manager.io/docs/usage/ingress/#supported-annotations): ```yaml hl_lines="5 13 14" apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: cert-manager.io/cluster-issuer: letsencrypt-prod name: foo spec: rules: - host: foo.example.com # ... tls: - hosts: - foo.example.com secretName: foo-tls-certificate ``` ```mermaid flowchart LR User -- 6 --> Ingress subgraph cluster[Homelab cluster] Ingress --- Secret Ingress -. 1 .-> Certificate Certificate -. 5 .-> Secret Certificate -- 2 --> CertificateRequest -- 3 --> Order -- 4 --> Challenge end Order -.- ACMEServer[ACME server] subgraph dnsprovider[DNS provider] TXT end Challenge -- 4.a --> TXT ACMEServer -.- Challenge ACMEServer -. 4.b .-> TXT ``` 1. cert-manager creates a corresponding `Certificate` resources 2. Based on the `Certificate` resource, cert-manager creates a `CertificateRequest` resource to request a signed certificate from the configured `ClusterIssuer` 3. The `CertificateRequest` will create an order with an ACME server (we use Let's Encrypt), which is represented by the `Order` resource 4. Then cert-manager will perform a [DNS-01](https://cert-manager.io/docs/configuration/acme/dns01) `Challenge`: 1. Create a DNS TXT record (contains a computed key) 2. The ACME server retrieve this key via a DNS lookup and validate that we own the domain for the requested certificate 7. cert-manager stores the certificate (typically `tls.crt` and `tls.key`) in the `Secret` specified in the `Ingress` configuration 8. Now you can access the HTTPS website with a valid certificate A much more detailed diagram can be found in the official documentation under [certificate lifecycle](https://cert-manager.io/docs/concepts/certificate/#certificate-lifecycle). ================================================ FILE: docs/concepts/development-shell.md ================================================ # Development shell The development shell makes it easy to get all of the dependencies needed to interact with the homelab. ## Prerequisites !!! info NixOS users can skip this step. Install Nix using one of the following methods: - [Official Nix installer](https://nixos.org/download) - [Determinate Nix Installer](https://docs.determinate.systems/getting-started/#installer) If you're using the official installer, add the following to your `~/.config/nix/nix.conf` to enable [Flakes](https://nixos.wiki/wiki/Flakes): ```conf experimental-features = nix-command flakes ``` ## How to open it Run the following command: ```sh nix develop ``` It will open a shell with all the dependencies defined in `./flake.nix`: ``` [khuedoan@ryzentower:~/Documents/homelab]$ which kubectl /nix/store/0558zzzqynzw7rx9dp2i7jymvznd1cqx-kubectl-1.30.1/bin/kubectl ``` !!! tip If you have [`direnv`](https://direnv.net) installed, you can run `direnv allow` once and it will automatically enter the Nix shell every time you `cd` into the project. ================================================ FILE: docs/concepts/pxe-boot.md ================================================ # PXE boot ```mermaid flowchart TD subgraph controller[Initial controller] Ansible dhcp[DHCP server] tftp[TFTP server] http[HTTP server] end machine[Bare metal machine] Ansible -. 1 .-> machine machine <-. 2, 3 .-> dhcp machine <-. 4, 5 .-> tftp machine <-. 6, 7 .-> http ``` 1. Ansible: Hey MAC address `xx:xx:xx:xx:xx:xx`, wake up! 2. Machine: Hello everyone, I just woke up in network mode, could someone please show me how to boot? 3. DHCP server: I hear you, here's your IP address, proceed to the next server to obtain your bootloader. 4. Machine: Hello, could you please send me my bootloader? 5. TFTP server: Here you go. Grab your boot configuration, kernel, and initial ramdisk as well. 6. Machine: Hi, I just booted into my bootloader, and my boot parameters instructed me to get the installation instructions, packages, etc. from this site. 7. HTTP server: It's all yours. 8. Machine: Great, now I can install the OS and reboot! Here's how it looks like in action: ================================================ FILE: docs/concepts/secrets-management.md ================================================ # Secrets management ## Overview - Global secrets are stored in the `global-secrets` namespace. - Integrate with GitOps using [External Secrets Operator](https://external-secrets.io). - Secrets that can be generated are automatically generated and stored in the `global-secrets` namespace. !!! info Despite the name _External_ Secrets Operator, global secrets are created in the same cluster and synced to other namespaces using the [Kubernetes provider](https://external-secrets.io/latest/provider/kubernetes). While not supported by default in this project, you can also use other external providers such as HashiCorp Vault, AWS Secret Manager, Google Cloud Secret Manager, Azure Key Vault, 1Password, etc. ```mermaid flowchart TD subgraph global-secrets-namespace[global-secrets namespace] secret-generator[Secret Generator] -- generate if not exist --> source-secrets[Source Secrets] end subgraph app-namespace[application namespace] ExternalSecret -- create --> Secret App -- read --> Secret end ClusterSecretStore -- read --> source-secrets ExternalSecret --- ClusterSecretStore ``` ## Randomly generated secrets This is useful when you want to generate random secrets like admin password and store in global secrets. ```yaml title="./platform/global-secrets/files/secret-generator/config.yaml" hl_lines="2-6" --8<-- ./platform/global-secrets/files/secret-generator/config.yaml --8<-- ``` ## Extra third-party secrets For third-party secrets that you don't control, add them to `external/terraform.tfvars` under the `extra_secrets` key, then run `make external`. They will be available as a Secret named `external` in the `global-secrets` namespace. You can use it with `ExternalSecret` just like any other global secret. ## How secrets are pulled from global secrets to other namespaces When you apply an `ExternalSecret` object, for example: ```yaml hl_lines="4 21-23" apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: gitea-admin-secret namespace: gitea spec: data: - remoteRef: conversionStrategy: Default key: gitea.admin property: password secretKey: password refreshInterval: 1h secretStoreRef: kind: ClusterSecretStore name: global-secrets target: creationPolicy: Owner deletionPolicy: Retain template: data: password: '{{ .password }}' username: gitea_admin engineVersion: v2 ``` This will create a corresponding Kubernetes secret: `kubectl describe secrets -n gitea gitea-admin-secret` ```yaml hl_lines="1 8-11" Name: gitea-admin-secret Namespace: gitea Labels: Annotations: reconcile.external-secrets.io/data-hash: Type: Opaque Data ==== password: 32 bytes username: 11 bytes ``` Please see the official documentation for more information: - [External Secrets Operator](https://external-secrets.io) - [API specification](https://external-secrets.io/latest/spec) ================================================ FILE: docs/concepts/testing.md ================================================ # Testing infrastructure code We use [Terratest](https://terratest.gruntwork.io) for automated tests. The tests are written in Go and can be found at `./test`. TODO: more docs here (PR welcomed) ================================================ FILE: docs/getting-started/install-pre-commit-hooks.md ================================================ # Install pre-commit hooks Git hook scripts are useful for identifying simple issues before commiting changes. Install [pre-commit](https://pre-commit.com/#install) first, one-liner for Arch users: ```sh sudo pacman -S python-pre-commit ``` Then install git hook scripts: ```sh make git-hooks ``` If you want to enable pre-commit on all repositories without enabling it manually, see [automatically enabling pre-commit on repositories](https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories). ================================================ FILE: docs/getting-started/user-onboarding.md ================================================ # User onboarding === "For user" ## Create user Ask an admin to create your account, provide the following information: - [ ] Full name (John Doe) - [ ] Select a username (`johndoe`) - [ ] Email address (`johndoe@example.com`) ## Install companion apps For all users: - [ ] A password manager (I personally recommend [Bitwarden](https://bitwarden.com/download)) - [ ] A [Matrix chat client](https://matrix.org/clients) (optional, you can use the web version) For technical users: - [ ] [Docker](https://docs.docker.com/engine/install) - [ ] [Nix](https://nixos.org/download) and [direnv](https://direnv.net) (optional, but highly recommended) - [ ] [Lens](https://k8slens.dev) (optional, you can use the included `kubectl` or `k9s` command in the tools container) === "For admin" Run the following script: ```sh ./scripts/onboard-user johndoe "John Doe" "johndoe@example.com" ``` Let the user scan the QR code or follow the link to set up passkeys or password + TOTP. ================================================ FILE: docs/getting-started/vpn-setup.md ================================================ # VPN setup You can choose between [Tailscale](https://tailscale.com), [Wireguard](https://www.wireguard.com), or use both like me. I primarily use WireGuard but keep Tailscale as a backup for when the WireGuard server is down. ## Tailscale (requires third-party account) Get an [auth key](https://tailscale.com/kb/1085/auth-keys) from [Tailscale admin console](https://login.tailscale.com/admin/authkeys): - Description: homelab - Reusable: optionally set this to true Add it to `external/terraform.tfvars` as an extra secret: ```hcl extra_secrets = { tailscale-auth-key = "tskey-auth-myauthkeyhere" } ``` You may want to back up the `external/terraform.tfvars` file to a secure location. Apply the secret: ```sh make external ``` Finally, [enable subnet routes](https://tailscale.com/kb/1019/subnets#step-3-enable-subnet-routes-from-the-admin-console) for `homelab-router` from the [admin console](https://login.tailscale.com/admin/machines). You can now connect to your homelab via Tailscale and [invite user to your Tailscale network](https://tailscale.com/kb/1371/invite-users). ## Wireguard (requires port-forwarding) ### Prerequisites Find your public IP address using: ```sh curl -4 ifconfig.me ``` If you don’t have a static IP address, use dynamic DNS and replace the IP with your domain name. Next, configure port forwarding in your router for the WireGuard service. !!! example Each router is different, here's mine for reference: - Protocol: `UDP` - Start Port: `51820` - End Port: `51820` - Local IP Address: `192.168.1.226` (find it with `kubectl get service -n wireguard wireguard`) - Start Port Local: `51820` - End Port Local: `51820` Generate a key pair for the server: ```sh wg genkey | tee /dev/tty | wg pubkey ``` This will generate a private key and a public key, in that order. Add the private key to `external/terraform.tfvars` as an extra secret: ```hcl extra_secrets = { wireguard-private-key = "privatekeyhere" } ``` You may want to back up the `external/terraform.tfvars` file to a secure location. Apply the secret: ```sh make external ``` I use `172.16.0.0/12` as the private IP range for WireGuard, but you can choose any private IP address range you prefer in `./apps/wireguard/values.yaml`. I also recommend removing my peers and adding your own. ### Add a new device to the server !!! info Each device requires its own configuration. Generate a new key pair for the device. You can generate it for the user, or they can generate it themselves if they prefer to keep the private key confidential: ```sh wg genkey | tee /dev/tty | wg pubkey ``` This will generate a private key and a public key, in that order. The private key must be saved in a secure password manager, and save the public key for the next step. Update the list of peers in `./apps/wireguard/values.yaml`, make sure you replace all of my peers with yours. !!! example Example configuration for my phone: ```ini [Peer] PublicKey = nITHFdgTkNZOTWeSWqnGXjgwlCJMKRCnnUsjMx2yp2U= AllowedIPs = 172.16.0.12/32 ``` - The public key is the one generated in the previous step. - `172.16.0.12/32` is the device's private IP address, manually selected from the `172.16.0.0/12` range mentioned above. ### Add the Wireguard config to the device Create a new configuration file for the device: ```ini [Interface] Address = /32 PrivateKey = [Peer] PublicKey = Endpoint = :51820 AllowedIPs = /32, ``` Replace placeholders with actual values and save as `wg0.conf`. !!! example Example configuration for my phone: ```ini [Interface] Address = 172.16.0.12/32 PrivateKey = [Peer] PublicKey = sSAZS1Z3vB7Wx8e2yVqXfeHjgWTa80wnSYoma3mZkiU Endpoint = :51820 AllowedIPs = 172.16.0.1/32, 192.168.1.224/27 ``` The client can now import this configuration and connect to your WireGuard mesh. Make sure you clean up the `wg0.conf` file after importing it to the client. === "Mobile" Generate a QR code from the configuration file: ```sh qrencode -t ansiutf8 -r wg0.conf ``` Then scan the QR code using the official WireGuard app. === "Linux" Import the WireGuard configuration using NetworkManager: ```sh nmcli connection import type wireguard file wg0.conf ``` Activate the connection: ```sh nmcli connection up wg0 ``` ## Headscale [Headscale](https://headscale.net) is a self-hosted implementation of the Tailscale control server that does not require a third-party account. To set it up, take a look at the changes proposed by [this PR](https://github.com/khuedoan/homelab/pull/190). ================================================ FILE: docs/how-to-guides/add-or-remove-nodes.md ================================================ # Add or remove nodes Or how to scale vertically. To replace the same node with a clean OS, remove it and add it again. ## Add new nodes !!! tip You can add multiple nodes at the same time Add its details to the inventory **at the end of the group** (masters or workers): ```diff title="metal/inventories/prod.yml" diff --git a/metal/inventories/prod.yml b/metal/inventories/prod.yml index 7f6474a..1bb2cbc 100644 --- a/metal/inventories/prod.yml +++ b/metal/inventories/prod.yml @@ -8,3 +8,4 @@ metal: workers: hosts: metal3: {ansible_host: 192.168.1.113, mac: '00:23:24:d1:f5:69', disk: sda, network_interface: eno1} + metal4: {ansible_host: 192.168.1.114, mac: '00:11:22:33:44:55', disk: sda, network_interface: eno1} ``` Install the OS and join the cluster: ``` make metal ``` That's it! ## Remove a node !!! danger It is recommended to remove nodes one at a time Remove it from the inventory: ```diff title="metal/inventories/prod.yml" diff --git a/metal/inventories/prod.yml b/metal/inventories/prod.yml index 7f6474a..d12b50a 100644 --- a/metal/inventories/prod.yml +++ b/metal/inventories/prod.yml @@ -4,7 +4,6 @@ metal: hosts: metal0: {ansible_host: 192.168.1.110, mac: '00:23:24:d1:f3:f0', disk: sda, network_interface: eno1} metal1: {ansible_host: 192.168.1.111, mac: '00:23:24:d1:f4:d6', disk: sda, network_interface: eno1} - metal2: {ansible_host: 192.168.1.112, mac: '00:23:24:e7:04:60', disk: sda, network_interface: eno1} workers: hosts: metal3: {ansible_host: 192.168.1.113, mac: '00:23:24:d1:f5:69', disk: sda, network_interface: eno1} ``` Drain the node: ```sh kubectl drain ${NODE_NAME} --delete-emptydir-data --ignore-daemonsets --force ``` Remove the node from the cluster ```sh kubectl delete node ${NODE_NAME} ``` Shutdown the node: ``` ssh root@${NODE_IP} poweroff ``` ================================================ FILE: docs/how-to-guides/alternate-dns-setup.md ================================================ # Alternate DNS setup !!! info Skip this step if you already use the included Cloudflare setup Before you can access the home page at , you'll need to update your DNS config. Some options for DNS config (choose one): - Change the DNS config at your domain registrar (already included and automated) - Change the DNS config in your router (also works if you don't own a domain) - Use [nip.io](https://nip.io) (suitable for a test environment) ## At your domain registrar (recommended) The default configuration is for Cloudflare DNS, but you can change the code to use other providers. ## In your router !!! tip If you don't have a domain, you can use the `home.arpa` domain (according to [RFC-8375](https://datatracker.ietf.org/doc/html/rfc8375)). You can add each subdomain one by one, or use a wildcard `*.example.com` and point it to the IP address of the load balancer. To acquire a list of subdomains and their addresses, use this command: ```sh ./scripts/get-dns-config ``` ## Use [nip.io](https://nip.io) Preconfigured in the `dev` branch. ================================================ FILE: docs/how-to-guides/backup-and-restore.md ================================================ # Backup and restore ## Prerequisites Create an S3 bucket to store backups. You can use AWS S3, Minio, or any other S3-compatible provider. - For AWS S3, your bucket URL might look something like this: `https://s3.amazonaws.com/my-homelab-backup`. - For Minio, your bucket URL might look something like this: `https://my-s3-host.example.com/homelab-backup`. Follow your provider's documentation to create a service account with the following policy (replace `my-homelab-backup` with your actual bucket name): ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::my-homelab-backup", "arn:aws:s3:::my-homelab-backup/*" ] } ] } ``` Save the access key and secret key to a secure location, such as a password manager. While you're at it, generate a new password for Restic encryption and save it there as well. !!! example I use Minio for my homelab backups. Here's how I set it up: - Create a bucket named `homelab-backup`. - Create a service account under Identity -> Service Accounts -> Create Service Account: - Enable Restrict beyond user policy. - Paste the policy above. - Click Create and copy the access key and secret key - I also set up Minio replication to store backups in two locations: one in my house and one remotely. ## Add backup credentials to global secrets Add the following to `external/terraform.tfvars`: ```hcl extra_secrets = { restic-password = "xxxxxxxxxxxxxxxxxxxxxxxx" restic-s3-bucket = "https://s3.amazonaws.com/my-homelab-backup-xxxxxxxxxx" restic-s3-access-key = "xxxxxxxxxxxxxxxx" restic-s3-secret-key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } ``` Then apply the changes: ```sh make external ``` You may want to back up the `external/terraform.tfvars` file to a secure location as well. ## Add backup configuration for volumes !!! warning Do not run the backup command when building a new cluster where you intend to restore backups, as it may overwrite existing backup data. To restore data on a new cluster, refer to the [restore from backup](#restore-from-backup) section. For now, you need to run a command to opt-in volumes until we have a better GitOps solution: ```sh make backup ``` This command will set up Restic repositories and back up the volumes configured in `./Makefile`. You can adjust the list there to add or remove volumes from the backup. You only need to run this command once, the backup configuration will be stored in the cluster and run on a schedule. ## Restore from backup The restore process is ad-hoc, you need to run a command to restore application volumes: ```sh make restore ``` The command above will restore the latest backup of recommended volumes. Like with backups, you can modify `./Makefile` to adjust the list of volumes you want to restore. ================================================ FILE: docs/how-to-guides/disable-dhcp-proxy-in-dnsmasq.md ================================================ # Disable DHCP proxy in dnsmasq ## Overview Dnsmasq is used as either a DHCP server or DHCP proxy server for PXE metal provisioning. Proxy mode is enabled by default allowing the use of existing DHCP servers on the network. A good description on how DHCP Proxy works can be found on the related [FOG project wiki page](https://wiki.fogproject.org/wiki/index.php?title=ProxyDHCP_with_dnsmasq). ## Disabling Proxy mode Certain scenarios will require this project to use a DHCP server, such as an air-gap deployment or dedicated VLAN. To disable proxy mode thereby using dnsmasq as a DHCP server, modify `metal/roles/pxe_server/defaults/main.yml` and set `dhcp_proxy` to `false`. ================================================ FILE: docs/how-to-guides/expose-services-to-the-internet.md ================================================ # Expose services to the internet !!! info This tutorial is for Cloudflare Tunnel users, please skip if you use port forwarding. Apply the `./external` layer to create a tunnel if you haven't already, then add the following annotations to your `Ingress` object (replace `example.com` with your domain): ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: external-dns.alpha.kubernetes.io/target: "homelab-tunnel.example.com" external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" # ... ``` ================================================ FILE: docs/how-to-guides/media-management.md ================================================ # Media management !!! warning This is for educational purposes only :wink: Use it at your own risk! ## Initial setup - Jellyfin `https://jellyfin.example.com`: - Create an `admin` user and save the credentials to your password manager - Add media libraries: - Movies at `/media/movies` - Shows at `/media/shows` - Radarr `https://radarr.example.com`: - Authentication method: Forms - Create an `admin` user and save the credentials to your password manager - Navigate to Settings -> Download Clients -> Add -> Transmission (you can keep the default address and port) - Navigate to Settings -> Media Management -> Add Root Folder `/movies` - Navigate to Settings -> General -> API Key -> copy it for the next steps (or save it to your password manager) - Sonarr `https://sonarr.example.com`: same as Radarr but use `/shows` for the root folder - Prowlarr `https://prowlarr.example.com`: - Authentication method: Forms - Create an `admin` user and save the credentials to your password manager - Navigate to Settings -> Apps -> Add: - Radarr: paste the API key (you can keep the default address and port) - Sonarr: same as Radarr - Go back to Indexers -> Add New Indexers - Jellyseerr `https://jellyseerr.example.com`: - Sign In - Use your Jellyfin account - URL: `https://jellyfin.example.com` - Email: you can enter anything - Username: `admin` - Password: same as Jellyfin - Configure Media Server - Enable Movies and Shows - Configure Services: - Add Radarr Server: - Default Server: true - Name: Radarr - Hostname: localhost - Port: use default - API Key: from previous step - Click Test - Quality Profile: choose whatever suits you - Root folder: `/movies` - External URL: `https://radarr.example.com` - Enable Scan: true - Add Sonarr Server: similar to Radarr Optionally, for convenience, you can add a `guest` account without a password in Jellyfin, allow access to all libraries, and allow that account to manage requests in Jellyseerr. ## Usage Here's a suggested flow: - Users using the `guest` account can request media in Jellyseerr - Admins approve the request (or you can enable auto-approve) - Wait for the media to be downloaded - Watch on Jellyfin You may need to increase the volume size depending on your usage. ================================================ FILE: docs/how-to-guides/run-commands-on-multiple-nodes.md ================================================ # Run commands on multiple nodes Use [ansible-console](https://docs.ansible.com/ansible/latest/cli/ansible-console.html): ```sh cd metal make console ``` Then enter the command(s) you want to run. !!! example `root@all (4)[f:5]$ uptime` ```console metal0 | CHANGED | rc=0 >> 10:52:02 up 2 min, 1 user, load average: 0.17, 0.15, 0.06 metal1 | CHANGED | rc=0 >> 10:52:02 up 2 min, 1 user, load average: 0.14, 0.11, 0.04 metal3 | CHANGED | rc=0 >> 10:52:02 up 2 min, 1 user, load average: 0.03, 0.02, 0.00 metal2 | CHANGED | rc=0 >> 10:52:02 up 2 min, 1 user, load average: 0.06, 0.06, 0.02 ``` ================================================ FILE: docs/how-to-guides/single-node-cluster-adjustments.md ================================================ # Single node cluster adjustments !!! danger This is not officially supported and I don't regularly test it, I highly recommend using multiple nodes. Using a single node could lead to data loss unless your backup strategy is rock solid, make sure you are **ABSOLUTELY CERTAIN** this is what you want. Update the following changes, then commit and push. ## Remove storage redundancy Set pod counts and number of data copies to `1`: ```yaml title="system/rook-ceph/values.yaml" hl_lines="4 6 11 12 18 22 25" rook-ceph-cluster: cephClusterSpec: mon: count: 1 mgr: count: 1 cephBlockPools: - name: standard-rwo spec: replicated: size: 1 requireSafeReplicaSize: false cephFileSystems: - name: standard-rwx spec: metadataPool: replicated: size: 1 dataPools: - name: data0 replicated: size: 1 metadataServer: activeCount: 1 activeStandby: false ``` ## Disable automatic upgrade Because they will try to drain the only node, the pods will have no place to go. Remove them entirely: ```sh rm -rf system/kured ``` Commit and push the change. You can revert it later when you add more nodes. ================================================ FILE: docs/how-to-guides/troubleshooting/pxe-boot.md ================================================ # PXE boot ## PXE server logs To view PXE server (includes DHCP, TFTP and HTTP server) logs: ```sh ./scripts/pxe-logs ``` !!! tip You can view the logs of one or more containers selectively, for example: ```sh ./scripts/pxe-logs dnsmasq ./scripts/pxe-logs http ``` ## Nodes not booting from the network - Plug a monitor and a keyboard to one of the bare metal node if possible to make the debugging process easier - Check if the controller (PXE server) is on the same subnet with bare metal nodes (sometimes Wifi will not work or conflict with wired Ethernet, try to turn it off) - Check if bare metal nodes are configured to boot from the network - Check if Wake-on-LAN is enabled - Check if the operating system ISO file is mounted - Check the controller's firewall config to make sure that the following ports are open: - DHCP (67/68) - TFTP (69) - HTTP (80) - Check PXE server Docker logs - Check if the servers are booting to the correct OS (Fedora Server installer instead of the previously installed OS), if not try to select it manually or remove the previous OS boot entry - Examine the network boot process with [Wireshark](https://www.wireshark.org) or [Termshark](https://termshark.io) ================================================ FILE: docs/how-to-guides/updating-documentation.md ================================================ # Updating documentation (this website) This project uses the [Diátaxis](https://diataxis.fr) technical documentation framework. The website is generated using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material) and can be viewed at [homelab.khuedoan.com](https://homelab.khuedoan.com). There are 4 main parts: - [Getting started (tutorials)](https://diataxis.fr/tutorials): learning-oriented - [Concepts (explanation)](https://diataxis.fr/explanation): understanding-oriented - [How-to guides](https://diataxis.fr/how-to-guides): goal-oriented - [Reference](https://diataxis.fr/reference): information-oriented ## Local development To edit and view locally, run: ```sh make docs ``` Then visit [localhost:8000](http://localhost:8000) ## Deployment It's running on my other cluster in the [khuedoan/horus](https://github.com/khuedoan/horus) project (so if the homelab goes down everyone can still read the documentation). ================================================ FILE: docs/how-to-guides/use-both-github-and-gitea.md ================================================ # Use both GitHub and Gitea Even though we self-host Gitea, you may still want to use GitHub as a backup and for discovery. Add both push URLs (replace my repositories with yours): ```sh git remote set-url --add --push origin git@git.khuedoan.com:ops/homelab git remote set-url --add --push origin git@github.com:khuedoan/homelab ``` Now you can just run `git push` like usual and it will push to both GitHub and Gitea. ================================================ FILE: docs/index.md ================================================ --8<-- README.md --8<-- ================================================ FILE: docs/installation/post-installation.md ================================================ # Post-installation ## Backup secrets Save the following files to a safe location like a password manager (if you're using the sandbox, you can skip this step): - `~/.ssh/id_ed25519` - `~/.ssh/id_ed25519.pub` - `./metal/kubeconfig.yaml` - `~/.terraform.d/credentials.tfrc.json` - `./external/terraform.tfvars` ## Admin credentials - ArgoCD: - Username: `admin` - Password: run `./scripts/argocd-admin-password` - Gitea: - Username: `gitea_admin` - Password: get from `global-secrets` namespace - Kanidm: - Usernames: `admin` and `idm_admin` - Password: run `./scripts/kanidm-reset-password admin` and `./scripts/kanidm-reset-password idm_admin` - Jellyfin and other applications in the \*arr stack: see the [dedicated guide for media management](../how-to-guides/media-management.md) - Other apps: - Username: `admin` - Password: get from `global-secrets` namespace ## Backup Now is a good time to set up backups for your homelab. Follow the [backup and restore guide](../how-to-guides/backup-and-restore.md) to get started. ## Run the full test suite After the homelab has been stabilized, you can run the full test suite to ensure that everything is working properly: ```sh make test ``` !!! info The "full" test suit is still in its early stages, so any contribution is greatly appreciated. ================================================ FILE: docs/installation/production/configuration.md ================================================ # Configuration Open the [development shell](../../concepts/development-shell.md), which includes all the tools needed: ```sh nix develop ``` Run the following script to configure the homelab: ```sh make configure ``` !!! example ``` Text editor (nvim): Enter seed repo (github.com/khuedoan/homelab): github.com/example/homelab Enter your domain (khuedoan.com): example.com ``` It will prompt you to edit the inventory: - IP address: the desired one, not the current one, since your servers have no operating system installed yet - Disk: based on `/dev/$DISK`, in my case it's `sda`, but yours can be `sdb`, `nvme0n1`... - Network interface: usually it's `eth0`, mine is `eno1` - MAC address: the **lowercase, colon separated** MAC address of the above network interface !!! example ```yaml title="metal/inventories/prod.yml" --8<-- metal/inventories/prod.yml --8<-- ``` At the end it will show what has changed. After examining the diff, commit and push the changes. ================================================ FILE: docs/installation/production/deployment.md ================================================ # Deployment Open the development shell if you haven't already: ```sh nix develop ``` Build the lab: ```sh make ``` Yes it's that simple! !!! example It will take a while to download everything, you can read the [architecture document](../../reference/architecture/overview.md) while waiting for the deployment to complete. ================================================ FILE: docs/installation/production/external-resources.md ================================================ # External resources !!! info These resources are optional, the homelab still works without them but will lack some features like trusted certificates and offsite backup Although I try to keep the amount of external resources to the minimum, there's still need for a few of them. Below is a list of external resources and why we need them (also see some [alternatives](#alternatives) below). | Provider | Resource | Purpose | | -------- | -------- | ------- | | Terraform Cloud | Workspace | Terraform state backend | | Cloudflare | DNS | DNS and [DNS-01 challenge](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge) for certificates | | Cloudflare | Tunnel | Public services to the internet without port forwarding | | ntfy | Topic | External notification service to receive alerts | ## Create credentials You'll be asked to provide these credentials on first build. ### Create Terraform workspace Terraform is stateful, which means it needs somewhere to store its state. Terraform Cloud is one option for a state backend with a generous free tier, perfect for a homelab. 1. Sign up for a [Terraform Cloud](https://cloud.hashicorp.com/products/terraform) account 2. Create a workspace named `homelab-external`, this is the workspace where your homelab state will be stored. 3. Change the "Execution Mode" from "Remote" to "Local". This will ensure your local machine, which can access your lab, is the one executing the Terraform plan rather than the cloud runners. If you decide to use a [different Terraform backend](https://www.terraform.io/language/settings/backends#available-backends), you'll need to edit the `external/versions.tf` file as required. ### Cloudflare - Buy a domain and [transfer it to Cloudflare](https://developers.cloudflare.com/registrar/get-started/transfer-domain-to-cloudflare) if you haven't already - Get Cloudflare email and account ID - Global API key: ### ntfy - Choose a topic name like (treat it like you password) ## Alternatives To avoid vendor lock-in, each external provider must have an equivalent alternative that is easy to replace: - Terraform Cloud: - Any other [Terraform backends](https://www.terraform.io/language/settings/backends) - Cloudflare DNS: - Update cert-manager and external-dns to use a different provider - [Alternate DNS setup](../../how-to-guides/alternate-dns-setup.md) - Cloudflare Tunnel: - Use port forwarding if it's available - Create a small VPS in the cloud and utilize Wireguard to route traffic via it - Access everything via VPN - See also [awesome tunneling](https://github.com/anderspitman/awesome-tunneling) - ntfy: - [Self-host your own ntfy server](https://docs.ntfy.sh/install) - Any other [integration supported by Grafana Alerting](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/integrations/#list-of-supported-integrations) ================================================ FILE: docs/installation/production/prerequisites.md ================================================ # Prerequisites ## Fork this repository Because [this project](https://github.com/khuedoan/homelab) applies GitOps practices, it's the source of truth for _my_ homelab, so you'll need to fork it to make it yours: [:fontawesome-solid-code-fork: Fork khuedoan/homelab](https://github.com/khuedoan/homelab/fork){ .md-button } By using this project you agree to [the license](../../reference/license.md). !!! summary "License TL;DR" - This project is free to use for any purpose, but it comes with no warranty - You must use the same [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html) in `LICENSE.md` - You must keep the copy right notice and/or include an acknowledgement - Your project must remain open-source ## Hardware requirements ### Initial controller !!! info The initial controller is the machine used to bootstrap the cluster, we only need it once, you can use your laptop or desktop - A **Linux** machine that can run Docker (because the `host` networking driver used for PXE boot [only supports Linux](https://docs.docker.com/network/host/), you can use a Linux virtual machine with bridged networking if you're on macOS or Windows). ### Servers Any modern `x86_64` computer(s) should work, you can use old PCs, laptops or servers. !!! info This is the requirements for _each_ node | Component | Minimum | Recommended | | :-- | :-- | :-- | | CPU | 2 cores | 4 cores | | RAM | 8 GB | 16 GB | | Hard drive | 128 GB | 512 GB (depending on your storage usage, the base installation will not use more than 128GB) | | Node count | 1 (checkout the [single node cluster adjustments](../../how-to-guides/single-node-cluster-adjustments.md) tutorial) | 3 or more for high availability | Additional capabilities: - Ability to boot from the network (PXE boot) - Wake-on-LAN capability, used to wake the machines up automatically without physically touching the power button ### Network setup - All servers must be connected to the same **wired** network with the initial controller - You have the access to change DNS config (on your router or at your domain registrar) ## Domain Buying a domain is highly recommended, but if you don't have one, see [alternate DNS setup](../../how-to-guides/alternate-dns-setup.md). ## BIOS setup !!! info You need to do it once per machine if the default config is not sufficent, usually for consumer hardware this can not be automated (it requires something like [IPMI](https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface) to automate). Common settings: - Enable Wake-on-LAN (WoL) and network boot - Use UEFI mode and disable CSM (legacy) mode - Disable secure boot Boot order options (select one, each has their pros and cons): 1. Only boot from the network if no operating system found: works on most hardware but you need to manually wipe your hard drive or delete the existing boot record for the current OS 2. Prefer booting from the network if turned on via WoL: more convenience but your BIOS must support it, and you must test it throughly to ensure you don't accidentally wipe your servers !!! example Below is my BIOS setup for reference. Your motherboard may have a different name for the options, so you'll need to adapt it to your hardware. ```yaml Devices: NetworkSetup: PXEIPv4: true PXEIPv6: false Advanced: CPUSetup: VT-d: true Power: AutomaticPowerOn: WoL: Automatic # Use network boot if Wake-on-LAN Security: SecureBoot: false Startup: CSM: false ``` ## Gather information - [ ] MAC address for each machine - [ ] OS disk name (for example `/dev/sda`) - [ ] Network interface name (for example `eth0`) - [ ] Choose a static IP address for each machine (just the desired address, we don't set anything up yet) ================================================ FILE: docs/installation/sandbox.md ================================================ # Development sandbox The sandbox is intended for trying out the homelab without any hardware or testing changes before applying them to the production environment. ## Prerequisites Host machine: - Recommended hardware specifications: - CPU: 4 cores - RAM: 16 GiB - OS: Linux (Windows and macOS are untested, please let me know if it works) - Available ports: `80` and `443` Install the following packages: - `docker` - `nix` (see [development shell](../concepts/development-shell.md) for the installation guide) Clone the repository and checkout the development branch: ```sh git clone https://github.com/khuedoan/homelab git checkout dev ``` ## Build Open the development shell, which includes all the tools needed: ```sh nix develop ``` Build a development cluster and bootstrap it: ``` make ``` !!! note It will take about 15 to 30 minutes to build depending on your internet connection ## Explore The homepage should be available at (ignore the security warning because we don't have valid certificates). See [admin credentials](../post-installation/#admin-credentials) for default passwords. If you want to make some changes, simply commit to the local `dev` branch and push it to Gitea in the sandbox: ```sh git remote add sandbox https://git.127-0-0-1.nip.io/ops/homelab git config http.https://git.127-0-0-1.nip.io.sslVerify false git add foobar.txt git commit -m "feat: harness the power of the sun" git push sandbox # you can use the gitea_admin account ``` ## Clean up Delete the cluster: ```sh k3d cluster delete homelab-dev ``` ## Caveats compare to production environment The development cluster doesn't have the following features: - There is no valid domain name, hence no SSL certificates (some services require valid SSL certificates) - Only accessible on the host machine - No backup Please keep in mind that the development cluster may be unstable and things may break (it's for development after all). ================================================ FILE: docs/reference/architecture/decision-records.md ================================================ # Decision records These are the records of design decisions for future reference in order to understand why things are the way they are. They are not permanent, we can change them in the future if better alternatives become available. ??? Template ## Description of the the change **Context** CHANGEME **Decision** CHANGEME **Consequences** - CHANGEME ## Remove the Docker wrapper for Nix shell **Context** The Docker wrapper was originally added because not everyone has Nix installed. However, it is not a good abstraction. Depending on how Docker (or Podman) was installed, there may be permission issues, and it is slower than running Nix directly on the host. **Decision** Remove the Docker wrapper and run the Nix development shell directly. While not everyone has Nix installed, not everyone has the same Docker setup either. **Consequences** - Requires an additional step to install Nix, but this is a one-time setup. - The `make tools` command has been removed, you now need to run `nix develop` directly. Although it can be added to the `Makefile`, this requires `make` to be installed, and not everyone has the same version of `make`. ## Remove HashiCorp Vault **Context** - HashiCorp changed their license, and it's no longer free/libre software. One of the highest priorities of this project is to minimize the usage of non-free software as much as possible, so I don't really want to keep Vault, especially considering the next point. - Vault is fairly complex to maintain properly. This project only uses Vault for two things: basic key-value secret store and its API to create and manage secrets dynamically. With the new Kubernetes secret provider in External Secrets, both features can be replaced with Kubernetes's built-in secrets and API server. - A related goal of using Vault as an identity provider for SSO will be discarded, and we'll use Authelia instead, which has a beta identity provider feature (or use another alternative). **Decision** Replace Vault with a simplier in-cluster global secret store. **Consequences** Unlike secret path in Vault, Kubernetes does not support `/` in object name. We need to change secret convention from `path` to `name` and replace `/` with `.`. Update secret generator config: ```diff -- path: gitea/admin +- name: gitea.admin data: - key: password length: 32 ``` Update secret references in `kind: ExternalSecret`: ```diff remoteRef: - key: /gitea/admin + key: gitea.admin ``` ## Manage package versions in development shell **Context** While Nix is reproducible, we need a way to control the versions of the tools and keep them up-to-date. For example, if we update the nixpkgs hash (in `flake.nix`) from `abcd1234` to `defa5678`: - `ansible`: 2.12.1 -> 2.12.6 - `terraform`: 1.2.0 -> 1.2.2 - `foobar`: 1.8.0 -> 1.9.0 That looks good. But when we update it from `defa5678` to `cdef9012`: - `ansible`: 2.12.6 -> 2.13.0 - `terraform`: 1.2.2 -> 1.3.1 - `foobar`: 1.9.0 -> 2.0.0 This time it breaks `foobar` because the new major version contains a breaking change. We can pin the specific version of each dependency in `flake.nix`, however, the maintenance burden is too high (even with Renovate) because we need to update the version of each package regularly rather than just the nixpkgs hash. Instead, we can just bump the nixpkgs hash and run some tests to ensure there is no breaking change. **Decision** Update the tests to ensure that the versions remain within the desired range (i.e. no breaking change). **Consequences** We have the rail guard from the tests to ensure that we don't upgrade to a new major version with breaking changes, and we can make a conscious decision to take the necessary steps prior to upgrading to the new major version. ## Refactor the tools container from plain Dockerfile to [Nix](https://nixos.org) **Context** The previous implementation of the tools container is not reproducible, if someone builds it a few weeks after me, they will receive different versions of the tools. Also, if you change something in the tool list, everything will be downloaded again, with no caching. **Decision** Move to Nix shell with a Docker wrapper, in case Nix is not available (see commit `adbaf32`). **Consequences** - All versions are pinned - When you change the list of tools, rebuilding is much faster ## Combine dhcpd and tftpd to dnsmasq in PXE server **Context** [Original proposal from @Bourne-ID](https://github.com/khuedoan/homelab/issues/70): > **Issue statement** > > The use of dhcpd is great for air-gap solutions where a new DHCP is required. However for some home networks which does not have the VLAN capability or for users who would like to use common router DHCP services, the use of DHCPD will cause duplicate DHCP servers and will result in potential network disruption, or will limit the ability to auto-provision the Metal stage of this project. > > **Proposed Solution: DHCP Proxy** > > Use DHCP Proxy services to add PXE features such as Next Server into this project. This allows for users to use the existing DHCP servers which may be locked down or incapable of using Next Server/PXE settings on their network to be able to auto-provision hardware through PXE (with certain common configurations, like static IP allocation or reduction in DHCP request ranges on the DHCP server) > > **Proposed Application: DNSMasq** > > DNSMasq in Proxy mode interoperates with existing DHCP servers over IPv4 to add features such as next-server, TFTP, etc. where such hardware is either locked or unconfigurable for such services. This would be an opt-in change, configurable through the pxe_server defaults file. > > **Proposed Target Audience** > > Users who either do not want to create their own VLAN or lack the hardware to configure such services. Users who want to use common router services for DHCP and have router access to configure static IP and/or DHCP allocation ranges. > > **Additional Risks with Proposed Change** > > - Additional Surface Area for Break-Out Attacks: Originally this project is locked to its own DHCP/VLAN, so any break-outs should be contained accordingly. Using common home networks increases the surface area of break-out attacks if the deployment is compromised. > - Mitigation: Enrolment into this change is opt in only. > > **Proposed Next Steps** > > 1. Trial/Adopt/Halt - A discussion with all or a decision by the project maintainers to identify if this change should exist in this project or live on a fork. > 2. Documentation (This is in flight in any situation). **Decision** Migrate to dnsmasq (see commit `f650c89`, thanks to [@Bourne-ID](https://github.com/Bourne-ID)) **Consequences** - DHCP proxy is enabled by default because most people have a standard home network with existing DHCP server, but it can still be disabled to restore the previous behavior ## Migrate documentation from [mdBook](https://rust-lang.github.io/mdBook) to [MkDocs](https://squidfunk.github.io/mkdocs-material) **Context** mdBook is very minimal and light weight, which I personally prefer. However, [Backstage TechDocs](https://backstage.io/docs/features/techdocs/techdocs-overview) which I plan to use currently only supports mkDocs. **Decision** Migrate documentation from mdBook to MkDocs (see commit `cd41343`). **Consequences** - We can no longer include only a portion of a file, see [facelessuser/pymdown-extensions#1462](https://github.com/facelessuser/pymdown-extensions/issues/1462). ## Choosing the base OS **Context** I've tried several distributions, and each has advantages and disadvantages. Fedora has a good (enough) balance between stability and new features. Alternatives considered: - Fedora CoreOS (moved to Rocky in `7667254`): - Pros: automatic and atomic upgrade, immutable, quick installation - Cons: hard to run Ansible on (Python is not included) - CentOS/Rocky Linux (moved to Fedora in `022b816`): - Pros: relatively stable (however we did encounter a breaking change [#63](https://github.com/khuedoan/homelab/issues/63), still not sure why) - Cons: kernel and packages are too old - Debian: couldn't get it to work with PXE boot and Rocky Linux was sufficient so I didn't push any further - Cluster API (previous attempt in ` a8e4a85`, I hope to get this to work someday): - Pros: control bare metal machines via Kubernetes API, open the possibility for autoscaling and autohealing - Cons: doesn't support simple WoL and shutdown via SSH (or similar) **Decision** Use Fedora as the base OS. **Consequences** `¯\_(ツ)_/¯` ================================================ FILE: docs/reference/architecture/networking.md ================================================ # Networking ```mermaid flowchart TD subgraph LAN laptop/desktop/phone <--> LoadBalancer subgraph k8s[Kubernetes cluster] Pod --> Service Service --> Ingress LoadBalancer cloudflared cloudflared <--> Ingress end LoadBalancer <--> Ingress end cloudflared -- outbound --> Cloudflare Internet -- inbound --> Cloudflare ``` TODO (PR welcomed) ================================================ FILE: docs/reference/architecture/overview.md ================================================ # Overview ## Components ``` +--------------+ | ./apps | |--------------| | ./platform | |--------------| +------------+ | ./system |- - - -| ./external | |--------------| +------------+ | ./metal | |--------------| | HARDWARE | +--------------+ ``` Main components: - `./metal`: bare metal management, install Linux and Kubernetes - `./system`: critical system components for the cluster (load balancer, storage, ingress, operation tools...) - `./platform`: essential components for service hosting platform (git, build runners, dashboards...) - `./apps`: user facing applications - `./external` (optional): externally managed services Support components: - `./docs`: all documentation go here, this will generate a searchable web UI - `./scripts`: scripts to automate common tasks ## Provisioning flow Everything is automated, after you edit the configuration files, you just need to run a single `make` command and it will: - (1) Build the `./metal` layer: - Create an ephemeral, stateless PXE server - Install Linux on all servers in parallel - Build a Kubernetes cluster (based on k3s) - (2) Bootstrap the `./system` layer: - Install ArgoCD and the root app to manage itself and other layers, from now on ArgoCD will do the rest - Install the remaining components (storage, monitoring, etc) - (3) Build the `./platform` layer (Gitea, Grafana, SSO, etc) - (4) Deploy applications in the `./apps` layer ```mermaid flowchart TD subgraph metal[./metal] pxe[PXE Server] -.-> linux[Fedora Server] --> k3s end subgraph system[./system] argocd[ArgoCD and root app] nginx[NGINX] rook-ceph[Rook Ceph] cert-manager external-dns[External DNS] cloudflared end subgraph external[./external] letsencrypt[Let's Encrypt] cloudflare[Cloudflare] end letsencrypt -.-> cert-manager cloudflare -.-> cert-manager cloudflare -.-> external-dns cloudflare -.-> cloudflared subgraph platform[./platform] Gitea Woodpecker Grafana end subgraph apps[./apps] homepage[Homepage] jellyfin[Jellyfin] matrix[Matrix] paperless[Paperless] end make[Run make] -- 1 --> metal -- 2 --> system -. 3 .-> platform -. 4 .-> apps ``` ================================================ FILE: docs/reference/changelog.md ================================================ # Changelog ## v0.0.8 Notable changes: - **build:** run post install scripts by default - **build:** set `KUBECONFIG` from global Makefile - **feat(external-dns)!:** add cluster name as owner ID - **feat(tools):** install `yamllint`, `ansible-lint` and `k9s` - **feat(tools):** set `KUBECONFIG` by default - **feat:** add pre-commit hooks - **feat:** add script to setup Gitea tokens and OAuth apps - **perf(argocd):** turning on selective sync - **refactor(docs):** migrate to [mkdocs](https://squidfunk.github.io/mkdocs-material) - **refactor(metal):** migrate to Fedora 36 for newer packages - **refactor(pxe)!:** combine dhcpd and tftpd to dnsmasq - Many bug fixes Please see git log for full change log. ## 0.0.7-alpha - Replace standard Vault with Vault Operator - Automatically initialize and unseal Vault - Declarative secret generation and management - Declarative Gitea configuration with YAML - Automatic OS rolling upgrade - Automatic Kubernetes rolling upgrade - Automatic application updates using Renovate (still require manual token generation) - Add script to wait for essential services after deployment - Add icons and bookmarks to the home page - Deploy Matrix chat - Replace Authentik with Dex for SSO (still require manual token generation) - Switch to Mermaid for diagrams in documentation - Replace Vagrant with k3d for development environment - Use nip.io domain for development environment - Remove Backblaze (S3 Glacier and/or Minio will be added in future version) - Enable monitor for the majority of applications - Many code refactorings and bug fixes ## 0.0.6-alpha - Upgrade to Kubernetes 1.23 - Support external resources: - Cloudflare DNS and Tunnel - Backblaze for backup - Auto inject secrets to required namespaces - Replace self-signed certificates with Let's Encrypt production (with API token injected from the `external` layer) - Add DNS records automatically using external-dns - Easy Cloudflare Tunnel configuration with annotations - Offsite backup to Backblaze B2 bucket using k8up-operator - Add private container registry - Remove Knative to save resources (temporarily) - Enable encryption at rest for Kubernetes Secrets - Add more Tekton tasks and pipelines - Initialize GitOps repository on Gitea automatically after install - Generate MetalLB address pool automatically (default to the last `/27` subnet) - Some bug fixes ## 0.0.5-alpha - Add convenience scripts - Add Loki for logging - Add custom health check for Application and ApplicationSet - Use Vault with dev mode on (temporarily until we hit beta) - Replace Authelia with Authentik - Upgrade to Kubernetes 1.22 - Upgrade most services to the latest version - Set ingress class and storage class explicitly - Initial Linkerd and Knative setup (not working yet) - Set up Hajimari for home page with automatic ingress discovery - Add dev VM for local development or evaluation - Optimize bare metal provisioning performance - Replace Syncthing with Seafile (may use both in the feature) - Enable Gitea SSH cloning via Ingress - Various code clean up - Add more documents ## 0.0.4-alpha - Switch to Rocky Linux - Some optimization for bare metal provisioning - Switch to k3s and combine Kubernetes cluster config in `./infra` layer to `./metal` layer (because k3s is also configured using Ansible) - Split boostrap Helm charts in `./infra` layer to `./bootstrap` layer (with new ArgoCD pattern) and `./system` layer - Add `./platform` layer for some applications like Gitea, Tekton... - User only need to provision `./metal` and `bootstrap` layer, the `./bootstrap` layer will deploy the remaining layers - Provisioning time from empty disk to running services is significantly reduced (thanks to k3s and new bootstrap pattern) - Use [mdBook](https://rust-lang.github.io/mdBook/) for documents - Replace Drone CI with Tekton - Enable TLS on all Ingresses (using [cert-manager](https://cert-manager.io)) - Add some new applications ## 0.0.3-alpha - Generate Terraform backend config automatically - Switch to CoreOS - Better PXE boot setup - Diagrams as code ## 0.0.2-alpha - Ensure idempotency for bare metal provisioning - Extract instead of mounting the OS ISO file - Easy initial controller setup (with only Docker) - Switch to Fedora - Remove LXD - Move etcd (Terraform state backend) back to Docker ## 0.0.1-alpha - Bare metal provisioning with PXE - LXD cluster - Terraform state backend (etcd) - RKE cluster - Core services (Vault, Gitea, ArgoCD,...) - Public services to the internet (via port forwarding or Cloudflare Tunnel) ================================================ FILE: docs/reference/contributing.md ================================================ # Contributing ## How to contribute ### Bug report You can [create a new GitHub issue](https://github.com/khuedoan/homelab/issues/new/choose) with the bug report template. ### Submitting patches Because you may have a lot of changes in your fork, you can't create a pull request directly from your `master` branch. Instead, create a branch from the upstream repository and commit your changes there: ```sh git remote add upstream https://github.com/khuedoan/homelab git fetch upstream git checkout upstream/master git checkout -b contrib-fix-something # Make your changes here # # nvim README.md # git cherry-pick a1b2c3 # # commit, push, etc. as usual ``` Then you can send the patch using [GitHub pull request](https://github.com/khuedoan/homelab/pulls) or `git send-email` to . ================================================ FILE: docs/reference/faq.md ================================================ # FAQ ## Is it necessary to install Linux on my servers before setting up the homelab? No, and that's the beauty of this setup. You start with empty hard drives, type a single command on your laptop/PC, and it will install the operating system for you automatically and in parallel over the network. ## Is it necessary to keep the PXE server running? No, the ephemeral PXE server is stateless, once Linux is installed on your servers, you can shut it down (or not, ideally, you don't even need to be aware of its existence). The Ansible setup in `./metal` is idempotent and will start the PXE server if needed. ================================================ FILE: docs/reference/license.md ================================================ Copyright © 2020 - 2024 Khue Doan --8<-- LICENSE.md --8<-- ================================================ FILE: docs/reference/roadmap.md ================================================ # Roadmap !!! info Current status: **ALPHA** ## Alpha requirements Literally anything that works. ## Beta requirements Good enough for tinkering and personal usage, and reasonably secure. - [x] Automated bare metal provisioning - [x] Controller set up (Docker) - [x] OS installation (PXE boot) - [x] Automated cluster creation (k3s) - [x] Automated application deployment (ArgoCD) - [x] Automated DNS management - [x] Initialize GitOps repository on Gitea automatically - [x] Observability - [x] Monitoring - [x] Logging - [x] Alerting - [x] SSO - [ ] Reasonably secure - [x] Automated certificate management - [x] Declarative secret management - [ ] Replace all default passwords with randomly generated ones - [x] Expose services to the internet securely with Cloudflare Tunnel - [x] Only use open-source technologies (except external managed services in `./external`) - [x] Everything is defined as code - [ ] Backup solution (3 copies, 2 seperate devices, 1 offsite) - [ ] Define [SLOs](https://en.wikipedia.org/wiki/Service-level_objective): - [ ] 70% availability (might break in the weekend due to new experimentation) - [x] Core applications - [x] Gitea - [x] Woodpecker - [x] Private container registry - [x] Homepage ## Stable requirements Can be used in "production" (for family or even small scale businesses). - [x] A single command to deploy everything - [x] Fast deployment time (from empty hard drive to running services in under 1 hour) - [ ] Fully _automatic_, not just _automated_ - [x] Bare-metal OS rolling upgrade - [x] Kubernetes version rolling upgrade - [x] Application version upgrade - [ ] Encrypted backups - [ ] Secrets rotation - [x] Self healing - [ ] Secure by default - [ ] SELinux - [ ] Network policies - [ ] Static code analysis - [ ] Chaos testing - [x] Minimal dependency on external services - [ ] Complete documentation - [x] Diagram as code - [x] Book (this book) - [ ] Walkthrough tutorial and feature demo (video) - [x] Configuration script for new users - [ ] More dashboards and alert rules - [ ] SLOs: - [ ] 99,9% availability (less than 9 hours of downtime per year) - [ ] 99,99% data durability - [ ] Clear upgrade path - [ ] Additional applications - [ ] Matrix with bridges - [ ] VPN server - [ ] PeerTube - [x] Blog - [ ] [Development dashboard](https://github.com/khuedoan/homelab-backstage) ## Unplanned Nice to have - [ ] Addition applications - [ ] Mail server - [ ] Air-gap install - [ ] Automated testing - [ ] Security audit - [ ] Cluster API ([last attempt](https://github.com/khuedoan/homelab/pull/2)) - [ ] Split DNS (requires a better router) ================================================ FILE: external/.gitignore ================================================ .terraform* terraform.tfstate terraform.tfvars ================================================ FILE: external/Makefile ================================================ .POSIX: default: apply ~/.terraform.d/credentials.tfrc.json: tofu login terraform.tfvars: cp terraform.tfvars.example ${@} nvim ${@} .terraform.lock.hcl: ~/.terraform.d/credentials.tfrc.json versions.tf terraform.tfvars tofu init touch ${@} namespaces: ansible-playbook namespaces.yml plan: .terraform.lock.hcl tofu plan apply: .terraform.lock.hcl namespaces tofu apply -auto-approve ================================================ FILE: external/main.tf ================================================ module "cloudflare" { source = "./modules/cloudflare" cloudflare_account_id = var.cloudflare_account_id cloudflare_email = var.cloudflare_email cloudflare_api_key = var.cloudflare_api_key } module "ntfy" { source = "./modules/ntfy" auth = var.ntfy } module "extra_secrets" { source = "./modules/extra-secrets" data = var.extra_secrets } ================================================ FILE: external/modules/cloudflare/main.tf ================================================ data "cloudflare_zone" "zone" { name = "khuedoan.com" } data "cloudflare_api_token_permission_groups" "all" {} resource "random_password" "tunnel_secret" { length = 64 special = false } resource "cloudflare_tunnel" "homelab" { account_id = var.cloudflare_account_id name = "homelab" secret = base64encode(random_password.tunnel_secret.result) } # Not proxied, not accessible. Just a record for auto-created CNAMEs by external-dns. resource "cloudflare_record" "tunnel" { zone_id = data.cloudflare_zone.zone.id type = "CNAME" name = "homelab-tunnel" value = "${cloudflare_tunnel.homelab.id}.cfargotunnel.com" proxied = false ttl = 1 # Auto } resource "kubernetes_secret" "cloudflared_credentials" { metadata { name = "cloudflared-credentials" namespace = "cloudflared" annotations = { "app.kubernetes.io/managed-by" = "Terraform" } } data = { "credentials.json" = jsonencode({ AccountTag = var.cloudflare_account_id TunnelName = cloudflare_tunnel.homelab.name TunnelID = cloudflare_tunnel.homelab.id TunnelSecret = base64encode(random_password.tunnel_secret.result) }) } } resource "cloudflare_api_token" "external_dns" { name = "homelab_external_dns" policy { permission_groups = [ data.cloudflare_api_token_permission_groups.all.zone["Zone Read"], data.cloudflare_api_token_permission_groups.all.zone["DNS Write"] ] resources = { "com.cloudflare.api.account.zone.*" = "*" } } } resource "kubernetes_secret" "external_dns_token" { metadata { name = "cloudflare-api-token" namespace = "external-dns" annotations = { "app.kubernetes.io/managed-by" = "Terraform" } } data = { "value" = cloudflare_api_token.external_dns.value } } resource "cloudflare_api_token" "cert_manager" { name = "homelab_cert_manager" policy { permission_groups = [ data.cloudflare_api_token_permission_groups.all.zone["Zone Read"], data.cloudflare_api_token_permission_groups.all.zone["DNS Write"] ] resources = { "com.cloudflare.api.account.zone.*" = "*" } } } resource "kubernetes_secret" "cert_manager_token" { metadata { name = "cloudflare-api-token" namespace = "cert-manager" annotations = { "app.kubernetes.io/managed-by" = "Terraform" } } data = { "api-token" = cloudflare_api_token.cert_manager.value } } ================================================ FILE: external/modules/cloudflare/variables.tf ================================================ variable "cloudflare_email" { type = string } variable "cloudflare_api_key" { type = string sensitive = true } variable "cloudflare_account_id" { type = string } ================================================ FILE: external/modules/cloudflare/versions.tf ================================================ terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" version = "~> 4.30.0" } kubernetes = { source = "hashicorp/kubernetes" version = "~> 2.26.0" } http = { source = "hashicorp/http" version = "~> 3.4.0" } } } provider "cloudflare" { email = var.cloudflare_email api_key = var.cloudflare_api_key } ================================================ FILE: external/modules/extra-secrets/main.tf ================================================ resource "kubernetes_secret" "external" { metadata { name = var.name namespace = var.namespace annotations = { "app.kubernetes.io/managed-by" = "Terraform" } } data = var.data } ================================================ FILE: external/modules/extra-secrets/variables.tf ================================================ variable "name" { type = string default = "external" } variable "namespace" { type = string default = "global-secrets" } variable "data" { type = map(string) } ================================================ FILE: external/modules/extra-secrets/versions.tf ================================================ terraform { required_providers { kubernetes = { source = "hashicorp/kubernetes" version = "~> 2.26.0" } } } ================================================ FILE: external/modules/ntfy/main.tf ================================================ resource "kubernetes_secret" "ntfy_auth" { metadata { name = "webhook-transformer" namespace = "monitoring-system" annotations = { "app.kubernetes.io/managed-by" = "Terraform" } } data = { NTFY_URL = var.auth.url NTFY_TOPIC = var.auth.topic } } ================================================ FILE: external/modules/ntfy/variables.tf ================================================ variable "auth" { type = object({ url = string topic = string }) } ================================================ FILE: external/modules/ntfy/versions.tf ================================================ terraform { required_providers { kubernetes = { source = "hashicorp/kubernetes" version = "~> 2.26.0" } } } ================================================ FILE: external/namespaces.yml ================================================ - hosts: localhost tasks: - name: Ensure required namespaces exist kubernetes.core.k8s: api_version: v1 kind: Namespace name: "{{ item }}" state: present loop: - cert-manager - cloudflared - external-dns - global-secrets - k8up-operator - monitoring-system ================================================ FILE: external/terraform.tfvars.example ================================================ # https://dash.cloudflare.com/profile cloudflare_email = "myaccount@example.com" # https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids cloudflare_account_id = "foobarid" # https://dash.cloudflare.com/profile/api-tokens cloudflare_api_key = "foobarkey" ntfy = { # https://ntfy.sh or your own instance url = "https://ntfy.sh" # Your topic name topic = "random_topic_name_here_a8sd7fkjxlkcjasdw33813" } extra_secrets = { # Try to keep this to a minimum with third-party secrets # Consider using the secret generator if possible # ../platform/global-secrets/files/secret-generator/config.yaml # Here's some examples of what you might want to add: # # wireguard-private-key = "wg genkey output here" # tailscale-auth-key = "tskey-auth-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # restic-password = "xxxxxxxxxxxxxxxxxxxxxxxx" # restic-s3-bucket = "https://s3.amazonaws.com/my-homelab-backup-xxxxxxxxxx" # restic-s3-access-key = "xxxxxxxxxxxxxxxx" # restic-s3-secret-key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } ================================================ FILE: external/variables.tf ================================================ variable "cloudflare_email" { type = string } variable "cloudflare_api_key" { type = string sensitive = true } variable "cloudflare_account_id" { type = string } variable "ntfy" { type = object({ url = string topic = string }) sensitive = true } variable "extra_secrets" { type = map(string) description = "Key-value pairs of extra secrets that cannot be randomly generated (e.g. third party API tokens)" sensitive = true default = {} } ================================================ FILE: external/versions.tf ================================================ terraform { required_version = "~> 1.7" backend "remote" { hostname = "app.terraform.io" organization = "khuedoan" workspaces { name = "homelab-external" } } required_providers { cloudflare = { source = "cloudflare/cloudflare" version = "~> 4.30.0" } kubernetes = { source = "hashicorp/kubernetes" version = "~> 2.26.0" } http = { source = "hashicorp/http" version = "~> 3.4.0" } } } provider "cloudflare" { email = var.cloudflare_email api_key = var.cloudflare_api_key } provider "kubernetes" { # Use KUBE_CONFIG_PATH environment variables # Or in cluster service account } ================================================ FILE: flake.nix ================================================ { description = "Homelab"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; in with pkgs; { devShells.default = mkShell { packages = [ ansible ansible-lint bmake diffutils docker docker-compose dyff git glibcLocales go gotestsum iproute2 jq k9s kanidm kube3d kubectl kubernetes-helm kustomize libisoburn neovim openssh_gssapi opentofu # Drop-in replacement for Terraform p7zip pre-commit qrencode shellcheck wireguard-tools yamllint (python3.withPackages (p: with p; [ jinja2 kubernetes mkdocs-material netaddr pexpect rich ])) ]; }; } ); } ================================================ FILE: metal/Makefile ================================================ .POSIX: env ?= prod export KUBECONFIG = $(shell pwd)/kubeconfig.yaml default: boot cluster ~/.ssh/id_ed25519: ssh-keygen -t ed25519 -P '' -f "$@" boot: ~/.ssh/id_ed25519 ansible-playbook \ --inventory inventories/${env}.yml \ boot.yml cluster: ansible-playbook \ --inventory inventories/${env}.yml \ cluster.yml console: ansible-console \ --inventory inventories/${env}.yml ================================================ FILE: metal/ansible.cfg ================================================ [defaults] host_key_checking=false stdout_callback=debug stderr_callback=debug force_color=true ================================================ FILE: metal/boot.yml ================================================ - name: Start PXE server hosts: localhost roles: - pxe_server - name: Provision bare metal machines hosts: metal gather_facts: false roles: - wake ================================================ FILE: metal/cluster.yml ================================================ - name: Create Kubernetes cluster hosts: metal roles: - prerequisites - k3s - automatic_upgrade - name: Install Kubernetes addons hosts: localhost roles: - cilium ================================================ FILE: metal/group_vars/all.yml ================================================ ansible_user: root ansible_ssh_private_key_file: ~/.ssh/id_ed25519 ssh_public_key: "{{ lookup('file', '~/.ssh/id_ed25519.pub') }}" dns_server: "8.8.8.8" ================================================ FILE: metal/inventories/prod.yml ================================================ all: vars: control_plane_endpoint: 192.168.1.100 load_balancer_ip_pool: - 192.168.1.224/27 metal: children: masters: hosts: metal0: {ansible_host: 192.168.1.110, mac: '00:23:24:d1:f5:69', disk: sda, network_interface: eno1} metal1: {ansible_host: 192.168.1.111, mac: '00:23:24:d1:f3:f0', disk: sda, network_interface: eno1} metal2: {ansible_host: 192.168.1.112, mac: '00:23:24:e7:04:60', disk: sda, network_interface: eno1} workers: hosts: metal3: {ansible_host: 192.168.1.113, mac: '00:23:24:d1:f4:d6', disk: sda, network_interface: eno1} ================================================ FILE: metal/inventories/stag.yml ================================================ metal: children: masters: hosts: proxmox0: {ansible_host: 192.168.1.169, mac: 'c2:f5:cf:1f:3e:c0', disk: sda, network_interface: ens18} workers: hosts: {} ================================================ FILE: metal/k3d-dev.yaml ================================================ apiVersion: k3d.io/v1alpha4 kind: Simple metadata: name: homelab-dev image: docker.io/rancher/k3s:v1.27.1-k3s1 servers: 1 agents: 0 options: k3s: extraArgs: - arg: --disable=traefik nodeFilters: - server:* - arg: --disable-cloud-controller nodeFilters: - server:* ports: - port: 80:80 nodeFilters: - loadbalancer - port: 443:443 nodeFilters: - loadbalancer ================================================ FILE: metal/roles/automatic_upgrade/files/automatic.conf ================================================ [commands] upgrade_type = default apply_updates = yes ================================================ FILE: metal/roles/automatic_upgrade/tasks/main.yml ================================================ - name: Install packages for automatic upgrade ansible.builtin.dnf: name: - dnf-automatic - dnf-utils - name: Copy automatic upgrade config file ansible.builtin.copy: src: automatic.conf dest: /etc/dnf/automatic.conf mode: 0644 - name: Enable automatic upgrade service ansible.builtin.systemd: name: dnf-automatic.timer state: started enabled: true ================================================ FILE: metal/roles/cilium/defaults/main.yml ================================================ cilium_repo_url: https://helm.cilium.io cilium_version: 1.16.1 cilium_namespace: kube-system cilium_values: operator: replicas: 1 kubeProxyReplacement: true l2announcements: enabled: true # TODO the host and port are k3s-specific, generic solution is in progress # https://github.com/cilium/cilium/issues/19038 # https://github.com/cilium/cilium/pull/28741 k8sServiceHost: 127.0.0.1 k8sServicePort: 6444 hubble: relay: enabled: true ui: enabled: true ================================================ FILE: metal/roles/cilium/tasks/main.yml ================================================ - name: Install Cilium kubernetes.core.helm: name: cilium chart_ref: cilium chart_repo_url: "{{ cilium_repo_url }}" chart_version: "{{ cilium_version }}" release_namespace: "{{ cilium_namespace }}" values: "{{ cilium_values }}" - name: Wait for Cilium CRDs kubernetes.core.k8s_info: kind: CustomResourceDefinition name: "{{ item }}" loop: - ciliuml2announcementpolicies.cilium.io - ciliumloadbalancerippools.cilium.io register: crd until: crd.resources | length > 0 retries: 5 delay: 10 - name: Apply Cilium resources kubernetes.core.k8s: template: "{{ item }}" loop: - ciliuml2announcementpolicy.yaml - ciliumloadbalancerippool.yaml ================================================ FILE: metal/roles/cilium/templates/ciliuml2announcementpolicy.yaml ================================================ apiVersion: cilium.io/v2alpha1 kind: CiliumL2AnnouncementPolicy metadata: name: default spec: externalIPs: true loadBalancerIPs: true ================================================ FILE: metal/roles/cilium/templates/ciliumloadbalancerippool.yaml ================================================ apiVersion: cilium.io/v2alpha1 kind: CiliumLoadBalancerIPPool metadata: name: default spec: blocks: {% for cidr in load_balancer_ip_pool %} - cidr: {{ cidr }} {% endfor %} ================================================ FILE: metal/roles/k3s/defaults/main.yml ================================================ k3s_version: v1.30.4+k3s1 k3s_config_file: /etc/rancher/k3s/config.yaml k3s_token_file: /etc/rancher/node/password k3s_service_file: /etc/systemd/system/k3s.service k3s_data_dir: /var/lib/rancher/k3s k3s_kubeconfig_file: /etc/rancher/k3s/k3s.yaml k3s_server_config: tls-san: - "{{ control_plane_endpoint }}" disable: - local-storage - servicelb - traefik disable-helm-controller: true disable-kube-proxy: true disable-network-policy: true flannel-backend: none secrets-encryption: true ================================================ FILE: metal/roles/k3s/files/bin/.gitignore ================================================ * !.gitignore ================================================ FILE: metal/roles/k3s/tasks/main.yml ================================================ - name: Download k3s binary ansible.builtin.get_url: url: https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/k3s checksum: sha256:https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/sha256sum-amd64.txt dest: "{{ role_path }}/files/bin/k3s" mode: 0755 delegate_to: localhost run_once: true register: k3s_binary - name: Copy k3s binary to nodes ansible.builtin.copy: src: bin/k3s dest: /usr/local/bin/k3s owner: root group: root mode: 0755 - name: Ensure config directories exist ansible.builtin.file: path: "{{ item }}" state: directory mode: 0755 loop: - /etc/rancher/k3s - /etc/rancher/node - "{{ k3s_data_dir }}/agent/pod-manifests" - name: Check if k3s token file exists on the first node run_once: true ansible.builtin.stat: path: "{{ k3s_token_file }}" register: k3s_token_file_stat - name: Generate k3s token file on the first node if not exist yet run_once: true when: not k3s_token_file_stat.stat.exists ansible.builtin.copy: content: "{{ lookup('community.general.random_string', length=32) }}" dest: "{{ k3s_token_file }}" mode: 0600 - name: Get k3s token from the first node run_once: true ansible.builtin.slurp: src: "{{ k3s_token_file }}" register: k3s_token_base64 - name: Ensure all nodes has the same token ansible.builtin.copy: content: "{{ k3s_token_base64.content | b64decode }}" dest: "{{ k3s_token_file }}" mode: 0600 - name: Copy k3s config files ansible.builtin.template: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: 0644 loop: - src: config.yaml.j2 dest: "{{ k3s_config_file }}" - src: k3s.service.j2 dest: "{{ k3s_service_file }}" - name: Copy kube-vip manifests when: "'masters' in group_names" ansible.builtin.template: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: 0644 loop: - src: kube-vip.yaml.j2 dest: "{{ k3s_data_dir }}/agent/pod-manifests/kube-vip.yaml" - name: Enable k3s service ansible.builtin.systemd: name: k3s enabled: true state: started register: k3s_service until: k3s_service is succeeded retries: 5 - name: Get Kubernetes config file run_once: true ansible.builtin.slurp: src: "{{ k3s_kubeconfig_file }}" register: kubeconfig_base64 - name: Write Kubernetes config file with the correct cluster address ansible.builtin.copy: content: "{{ kubeconfig_base64.content | b64decode | replace('127.0.0.1', control_plane_endpoint) }}" dest: "{{ playbook_dir }}/kubeconfig.yaml" mode: 0600 delegate_to: localhost run_once: true ================================================ FILE: metal/roles/k3s/templates/config.yaml.j2 ================================================ {% if inventory_hostname == groups['masters'][0] %} cluster-init: true {% else %} server: https://{{ control_plane_endpoint }}:6443 {% endif %} token-file: {{ k3s_token_file }} {% if 'masters' in group_names %} {{ k3s_server_config | to_nice_yaml }} {% endif %} snapshotter: stargz ================================================ FILE: metal/roles/k3s/templates/k3s.service.j2 ================================================ [Unit] Description=Lightweight Kubernetes Documentation=https://k3s.io After=network-online.target [Service] Type=notify ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe overlay ExecStart=/usr/local/bin/k3s {{ 'server' if 'masters' in group_names else 'agent' }} KillMode=process Delegate=yes # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILE=1048576 LimitNPROC=infinity LimitCORE=infinity TasksMax=infinity TimeoutStartSec=0 Restart=always RestartSec=5s [Install] WantedBy=multi-user.target ================================================ FILE: metal/roles/k3s/templates/kube-vip.yaml.j2 ================================================ apiVersion: v1 kind: Pod metadata: name: kube-vip namespace: kube-system spec: containers: - name: kube-vip image: ghcr.io/kube-vip/kube-vip:v0.6.4 args: - manager env: - name: address value: {{ control_plane_endpoint }} - name: vip_arp value: "true" - name: cp_enable value: "true" - name: vip_leaderelection value: "true" - name: lb_enable value: "true" securityContext: capabilities: add: - NET_ADMIN - NET_RAW volumeMounts: - mountPath: /etc/kubernetes/admin.conf name: kubeconfig hostAliases: - hostnames: - kubernetes ip: 127.0.0.1 hostNetwork: true volumes: - hostPath: path: {{ k3s_kubeconfig_file }} name: kubeconfig ================================================ FILE: metal/roles/prerequisites/tasks/main.yml ================================================ - name: Adjust kernel parameters ansible.posix.sysctl: name: "{{ item.name }}" value: "{{ item.value }}" loop: - {name: "fs.inotify.max_queued_events", value: 16384} - {name: "fs.inotify.max_user_instances", value: 8192} - {name: "fs.inotify.max_user_watches", value: 524288} ================================================ FILE: metal/roles/pxe_server/defaults/main.yml ================================================ iso_url: "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/39/Server/x86_64/iso/Fedora-Server-dvd-x86_64-39-1.5.iso" iso_checksum: "sha256:2755cdff6ac6365c75be60334bf1935ade838fc18de53d4c640a13d3e904f6e9" timezone: Asia/Ho_Chi_Minh dhcp_proxy: true ================================================ FILE: metal/roles/pxe_server/files/data/init-config/.gitignore ================================================ * !.gitignore ================================================ FILE: metal/roles/pxe_server/files/data/iso/.gitignore ================================================ * !.gitignore ================================================ FILE: metal/roles/pxe_server/files/data/os/.gitignore ================================================ * !.gitignore ================================================ FILE: metal/roles/pxe_server/files/data/pxe-config/.gitignore ================================================ * !.gitignore ================================================ FILE: metal/roles/pxe_server/files/dnsmasq/Dockerfile ================================================ FROM alpine:3.19 RUN apk --no-cache add dnsmasq ENTRYPOINT ["dnsmasq", "-k"] ================================================ FILE: metal/roles/pxe_server/files/docker-compose.yml ================================================ services: dnsmasq: build: ./dnsmasq volumes: - ./data/pxe-config/dnsmasq.conf:/etc/dnsmasq.conf - ./data/pxe-config/grub.cfg:/tftp/grub.cfg - ./data/os/EFI/BOOT/grubx64.efi:/tftp/grubx64.efi - ./data/os/images/pxeboot/initrd.img:/tftp/initrd.img - ./data/os/images/pxeboot/vmlinuz:/tftp/vmlinuz network_mode: host cap_add: - NET_ADMIN http: build: ./http network_mode: host volumes: - ./data/os:/usr/share/nginx/html/os - ./data/init-config/:/usr/share/nginx/html/init-config environment: NGINX_PORT: 80 ================================================ FILE: metal/roles/pxe_server/files/http/Dockerfile ================================================ FROM nginx:1.25-alpine ================================================ FILE: metal/roles/pxe_server/tasks/main.yml ================================================ - name: Get Docker info docker_host_info: {} register: docker_info_result - name: Ensure Docker is running on a supported operating system fail: msg: Docker host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac or Windows (you can use a Linux VM with bridged networking instead) when: - docker_info_result.host_info.OperatingSystem == "Docker Desktop" - name: Download boot image ansible.builtin.get_url: url: "{{ iso_url }}" dest: "{{ role_path }}/files/data/iso/{{ iso_url | basename }}" checksum: "{{ iso_checksum }}" mode: 0644 register: iso - name: Extract boot image ansible.builtin.command: cmd: "xorriso -osirrox on -indev {{ iso.dest }} -extract / {{ role_path }}/files/data/os" creates: "{{ role_path }}/files/data/os/.treeinfo" - name: Generate dnsmasq config ansible.builtin.template: src: dnsmasq.conf.j2 dest: "{{ role_path }}/files/data/pxe-config/dnsmasq.conf" mode: 0644 - name: Generate GRUB config ansible.builtin.template: src: grub.cfg.j2 dest: "{{ role_path }}/files/data/pxe-config/grub.cfg" mode: 0644 - name: Generate init config for each machine ansible.builtin.template: src: kickstart.ks.j2 dest: "{{ role_path }}/files/data/init-config/{{ hostvars[item]['mac'] }}.ks" mode: 0644 loop: "{{ groups['metal'] }}" - name: Start the ephemeral PXE server community.docker.docker_compose_v2: project_src: "{{ role_path }}/files" state: present build: always ================================================ FILE: metal/roles/pxe_server/templates/dnsmasq.conf.j2 ================================================ # Disable DNS Server. port=0 {% if dhcp_proxy == true %} # We're DHCP proxying on the network of the homelab host dhcp-range={{ ansible_default_ipv4.address }},proxy pxe-service=X86-64_EFI, "Boot From Network, (UEFI)", grubx64.efi {% else %} # We're DHCP configuring on this range dhcp-range={{ ansible_default_ipv4.network | ansible.netcommon.ipmath(1) }},{{ ansible_default_ipv4.broadcast | ansible.netcommon.ipmath(-1) }},{{ ansible_default_ipv4.netmask }},12h dhcp-option=3,{{ ansible_default_ipv4.gateway }} # Match Arch Types efi x86 and x64 dhcp-match=set:efi-x86_64,option:client-arch,7 dhcp-match=set:efi-x86_64,option:client-arch,9 # Set the Boot file based on the tag from above dhcp-boot=tag:efi-x86_64,grubx64.efi {% endif %} # Log DHCP queries to stdout log-queries log-dhcp log-facility=- # Enable TFTP server enable-tftp tftp-root=/tftp ================================================ FILE: metal/roles/pxe_server/templates/grub.cfg.j2 ================================================ set timeout=1 menuentry '{{ iso_url | basename | splitext | first }} (PXE)' { linux vmlinuz \ ip=dhcp \ inst.ks=http://{{ ansible_default_ipv4.address }}/init-config/${net_default_mac}.ks initrd initrd.img } ================================================ FILE: metal/roles/pxe_server/templates/kickstart.ks.j2 ================================================ #version=RHEL8 # Do not use graphical install text # Keyboard layouts keyboard --xlayouts='us' # System language lang en_US.UTF-8 # Partition clearing information clearpart --all --drives={{ hostvars[item]['disk'] }} # Partitioning ignoredisk --only-use={{ hostvars[item]['disk'] }} partition /boot/efi --fstype=vfat --size=512 partition / --fstype=ext4 --size=65536 # Network information network --bootproto=static --device={{ hostvars[item]['network_interface'] }} --ip={{ hostvars[item]['ansible_host'] }} --gateway={{ ansible_default_ipv4.gateway }} --nameserver={{ dns_server }} --netmask={{ ansible_default_ipv4.netmask }} --ipv6=auto --hostname={{ hostvars[item]['inventory_hostname'] }} --activate # Use network installation repo --name="Repository" --baseurl=http://{{ ansible_default_ipv4.address }}/os url --url="http://{{ ansible_default_ipv4.address }}/os" # Disable Setup Agent on first boot firstboot --disable # Do not configure the X Window System skipx # Enable NTP services --enabled="chronyd" # System timezone timezone {{ timezone }} --utc # Create user (locked by default) user --groups=wheel --name=admin # Add SSH key sshkey --username=root "{{ ssh_public_key }}" # Disable root password login rootpw --lock # Disable SELinux selinux --disabled # Disable firewall firewall --disabled %packages @^custom-environment openssh-server %end # Create a raw partition for Ceph using the remaining space # Using a post script because there is no built-in feature in Kickstart # The three empty lines are equivalent to pressing Enter to use the default values for: # - Partition number # - First sector # - Last sector %post fdisk /dev/{{ hostvars[item]['disk'] }} << EOF new write EOF %end reboot ================================================ FILE: metal/roles/wake/tasks/main.yml ================================================ - name: Send Wake-on-LAN magic packets community.general.wakeonlan: mac: "{{ mac }}" delegate_to: localhost - name: Wait for the machines to come online ansible.builtin.wait_for_connection: timeout: 600 ================================================ FILE: mkdocs.yml ================================================ # yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json site_name: Khue's Homelab copyright: Copyright © 2020 - 2024 Khue Doan repo_url: https://github.com/khuedoan/homelab theme: favicon: https://github.com/khuedoan/homelab/assets/27996771/d33be1af-3687-4712-a671-4370da13cc92 name: material palette: primary: black features: - navigation.expand - navigation.instant - navigation.sections - search.highlight - search.share markdown_extensions: - pymdownx.emoji: emoji_index: !!python/name:material.extensions.emoji.twemoji emoji_generator: !!python/name:material.extensions.emoji.to_svg - attr_list - admonition - pymdownx.details - pymdownx.snippets: check_paths: true - def_list - pymdownx.tasklist: - pymdownx.superfences: custom_fences: - name: mermaid class: mermaid format: !!python/name:pymdownx.superfences.fence_code_format - pymdownx.tabbed: alternate_style: true nav: - Home: index.md - Installation: - installation/sandbox.md - Production: - installation/production/prerequisites.md - installation/production/external-resources.md - installation/production/configuration.md - installation/production/deployment.md - installation/post-installation.md - Getting started: - getting-started/vpn-setup.md - getting-started/user-onboarding.md - getting-started/install-pre-commit-hooks.md - Concepts: - concepts/pxe-boot.md - concepts/secrets-management.md - concepts/certificate-management.md - concepts/development-shell.md - concepts/testing.md - How-to guides: - how-to-guides/alternate-dns-setup.md - how-to-guides/expose-services-to-the-internet.md - how-to-guides/backup-and-restore.md - how-to-guides/use-both-github-and-gitea.md - how-to-guides/add-or-remove-nodes.md - how-to-guides/run-commands-on-multiple-nodes.md - how-to-guides/single-node-cluster-adjustments.md - how-to-guides/disable-dhcp-proxy-in-dnsmasq.md - how-to-guides/media-management.md - how-to-guides/updating-documentation.md - Troubleshooting: - how-to-guides/troubleshooting/pxe-boot.md - Reference: - Architecture: - reference/architecture/overview.md - reference/architecture/networking.md - reference/architecture/decision-records.md - reference/license.md - reference/changelog.md - reference/roadmap.md - reference/contributing.md - reference/faq.md ================================================ FILE: platform/dex/Chart.yaml ================================================ apiVersion: v2 name: dex version: 0.0.0 dependencies: - name: dex version: 0.16.0 repository: https://charts.dexidp.io ================================================ FILE: platform/dex/templates/secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: dex-secrets namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets target: name: dex-secrets data: # Connectors - secretKey: KANIDM_CLIENT_ID remoteRef: key: kanidm.dex property: client_id - secretKey: KANIDM_CLIENT_SECRET remoteRef: key: kanidm.dex property: client_secret # Clients - secretKey: GRAFANA_SSO_CLIENT_SECRET remoteRef: key: dex.grafana property: client_secret - secretKey: GITEA_CLIENT_SECRET remoteRef: key: dex.gitea property: client_secret ================================================ FILE: platform/dex/values.yaml ================================================ dex: config: issuer: https://dex.khuedoan.com storage: type: kubernetes config: inCluster: true oauth2: skipApprovalScreen: true connectors: - type: oidc id: kanidm name: Kanidm config: clientID: $KANIDM_CLIENT_ID clientSecret: $KANIDM_CLIENT_SECRET redirectURI: https://dex.khuedoan.com/callback issuer: https://auth.khuedoan.com/oauth2/openid/dex # TODO https://github.com/dexidp/dex/pull/3188 # enablePKCE: true scopes: - openid - profile - email - groups staticClients: - id: grafana-sso name: Grafana redirectURIs: - 'https://grafana.khuedoan.com/login/generic_oauth' secretEnv: GRAFANA_SSO_CLIENT_SECRET - id: gitea name: Gitea redirectURIs: - 'https://git.khuedoan.com/user/oauth2/Dex/callback' secretEnv: GITEA_CLIENT_SECRET envFrom: - secretRef: name: dex-secrets ingress: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &host dex.khuedoan.com paths: - path: / pathType: ImplementationSpecific tls: - secretName: dex-tls-certificate hosts: - *host ================================================ FILE: platform/external-secrets/Chart.yaml ================================================ apiVersion: v2 name: external-secrets version: 0.0.0 dependencies: - name: external-secrets version: 0.10.2 repository: https://charts.external-secrets.io ================================================ FILE: platform/gitea/Chart.yaml ================================================ apiVersion: v2 name: gitea version: 0.0.0 dependencies: - name: gitea version: 10.1.3 repository: https://dl.gitea.io/charts/ ================================================ FILE: platform/gitea/files/config/config.yaml ================================================ # TODO create user and access token # users: # - name: renovate # fullName: Renovate # email: bot@renovateapp.com # tokenSecretRef: renovate-secret # ??? organizations: - name: ops description: Operations teams: - name: Owners members: - renovate repositories: - name: homelab owner: ops private: false migrate: source: https://github.com/khuedoan/homelab mirror: false - name: blog owner: khuedoan migrate: source: https://github.com/khuedoan/blog mirror: true - name: backstage owner: khuedoan migrate: source: https://github.com/khuedoan/backstage mirror: true ================================================ FILE: platform/gitea/files/config/go.mod ================================================ module git.khuedoan.com/khuedoan/homelab/gitea/config go 1.19 require ( code.gitea.io/sdk/gitea v0.15.1 gopkg.in/yaml.v2 v2.4.0 ) require github.com/hashicorp/go-version v1.2.1 // indirect ================================================ FILE: platform/gitea/files/config/go.sum ================================================ code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE= code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M= code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= ================================================ FILE: platform/gitea/files/config/main.go ================================================ package main // TODO WIP clean this up import ( "log" "os" "code.gitea.io/sdk/gitea" "gopkg.in/yaml.v2" ) type Organization struct { Name string Description string } type Repository struct { Name string Owner string Private bool Migrate struct { Source string Mirror bool } } type Config struct { Organizations []Organization Repositories []Repository } func main() { data, err := os.ReadFile("./config.yaml") if err != nil { log.Fatalf("Unable to read config file: %v", err) } config := Config{} err = yaml.Unmarshal([]byte(data), &config) if err != nil { log.Fatalf("error: %v", err) } gitea_host := os.Getenv("GITEA_HOST") gitea_user := os.Getenv("GITEA_USER") gitea_password := os.Getenv("GITEA_PASSWORD") options := (gitea.SetBasicAuth(gitea_user, gitea_password)) client, err := gitea.NewClient(gitea_host, options) if err != nil { log.Fatal(err) } for _, org := range config.Organizations { _, _, err = client.CreateOrg(gitea.CreateOrgOption{ Name: org.Name, Description: org.Description, }) if err != nil { log.Printf("Create organization %s: %v", org.Name, err) } } for _, repo := range config.Repositories { if repo.Migrate.Source != "" { _, _, err = client.MigrateRepo(gitea.MigrateRepoOption{ RepoName: repo.Name, RepoOwner: repo.Owner, CloneAddr: repo.Migrate.Source, Service: gitea.GitServicePlain, Mirror: repo.Migrate.Mirror, Private: repo.Private, MirrorInterval: "10m", }) if err != nil { log.Printf("Migrate %s/%s: %v", repo.Owner, repo.Name, err) } } else { _, _, err = client.AdminCreateRepo(repo.Owner, gitea.CreateRepoOption{ Name: repo.Name, // Description: "TODO", Private: repo.Private, }) } } } ================================================ FILE: platform/gitea/templates/admin-secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: {{ .Values.gitea.gitea.admin.existingSecret }} namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets target: template: engineVersion: v2 data: username: gitea_admin password: {{` "{{ .password }}" `}} data: - secretKey: password remoteRef: key: gitea.admin property: password ================================================ FILE: platform/gitea/templates/config-job.yaml ================================================ apiVersion: batch/v1 kind: Job metadata: name: gitea-config-{{ include (print $.Template.BasePath "/config-source.yaml") . | sha256sum | trunc 7 }} namespace: {{ .Release.Namespace }} annotations: argocd.argoproj.io/sync-wave: "1" spec: backoffLimit: 10 template: spec: restartPolicy: Never containers: - name: apply image: golang:1.19-alpine env: - name: GITEA_HOST value: http://gitea-http:3000 - name: GITEA_USER valueFrom: secretKeyRef: name: gitea-admin-secret key: username - name: GITEA_PASSWORD valueFrom: secretKeyRef: name: gitea-admin-secret key: password workingDir: /go/src/gitea-config command: - sh - -c args: - | go get . go run . volumeMounts: - name: source mountPath: /go/src/gitea-config volumes: - name: source configMap: name: gitea-config-source ================================================ FILE: platform/gitea/templates/config-source.yaml ================================================ apiVersion: v1 kind: ConfigMap metadata: name: gitea-config-source namespace: {{ .Release.Namespace }} data: {{ (.Files.Glob "files/config/*").AsConfig | indent 2 }} ================================================ FILE: platform/gitea/values.yaml ================================================ gitea: ingress: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: &host git.khuedoan.com paths: - path: / pathType: Prefix tls: - secretName: gitea-tls-certificate hosts: - *host gitea: admin: existingSecret: gitea-admin-secret config: server: LANDING_PAGE: explore ROOT_URL: https://git.khuedoan.com OFFLINE_MODE: true repository: DISABLED_REPO_UNITS: repo.wiki,repo.projects,repo.packages DISABLE_STARS: true DEFAULT_BRANCH: master # TODO it's not reading the username from Dex correctly for now, related issues: # https://github.com/go-gitea/gitea/issues/25725 # https://github.com/go-gitea/gitea/issues/24957 # oauth2_client: # ENABLE_AUTO_REGISTRATION: true # USERNAME: userid service.explore: DISABLE_USERS_PAGE: true actions: ENABLED: false webhook: ALLOWED_HOST_LIST: private ================================================ FILE: platform/global-secrets/Chart.yaml ================================================ apiVersion: v2 name: global-secrets version: 0.0.0 ================================================ FILE: platform/global-secrets/files/secret-generator/config.yaml ================================================ # Gitea - name: gitea.admin data: - key: password length: 32 special: true # Dex - name: dex.grafana data: - key: client_secret length: 32 special: false - name: dex.gitea data: - key: client_secret length: 32 special: false # Registry - name: registry.admin data: - key: password length: 32 special: true # Woodpecker - name: woodpecker.agent data: - key: secret length: 32 special: false # Paperless - name: paperless.admin data: - key: PAPERLESS_ADMIN_PASSWORD length: 32 special: true ================================================ FILE: platform/global-secrets/files/secret-generator/go.mod ================================================ module git.khuedoan.com/khuedoan/homelab/platform/secret-generator go 1.19 require ( github.com/sethvargo/go-password v0.2.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.4 k8s.io/apimachinery v0.28.4 k8s.io/client-go v0.28.4 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/spf13/pflag v1.0.5 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) ================================================ FILE: platform/global-secrets/files/secret-generator/go.sum ================================================ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/sethvargo/go-password v0.2.0 h1:BTDl4CC/gjf/axHMaDQtw507ogrXLci6XRiLc7i/UHI= github.com/sethvargo/go-password v0.2.0/go.mod h1:Ym4Mr9JXLBycr02MFuVQ/0JHidNetSgbzutTr3zsYXE= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= ================================================ FILE: platform/global-secrets/files/secret-generator/main.go ================================================ package main import ( "context" "fmt" "log" "math" "os" "github.com/sethvargo/go-password/password" "gopkg.in/yaml.v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" ) const namespace = "global-secrets" type RandomSecret struct { Name string Data []struct { Key string Length int Special bool } } func getClient() (*kubernetes.Clientset, error) { rules := clientcmd.NewDefaultClientConfigLoadingRules() overrides := &clientcmd.ConfigOverrides{} config, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(rules, overrides).ClientConfig() if err != nil { return nil, fmt.Errorf("Error building client config: %v", err) } return kubernetes.NewForConfig(config) } func generateRandomPassword(length int, special bool) (string, error) { numDigits := int(math.Ceil(float64(length) * 0.2)) numSymbols := 0 if special { numSymbols = int(math.Ceil(float64(length) * 0.2)) } return password.Generate(length, numDigits, numSymbols, false, true) } func readConfigFile(filename string) ([]RandomSecret, error) { data, err := os.ReadFile(filename) if err != nil { return nil, fmt.Errorf("Unable to read config file: %v", err) } var randomSecrets []RandomSecret err = yaml.Unmarshal(data, &randomSecrets) if err != nil { return nil, fmt.Errorf("Error parsing config file: %v", err) } return randomSecrets, nil } func createOrUpdateSecret(client *kubernetes.Clientset, name string, randomSecret RandomSecret) error { secret, err := client.CoreV1().Secrets(namespace).Get(context.Background(), name, metav1.GetOptions{}) if err != nil { // Secret not found, create a new one secretData := map[string][]byte{} for _, randomPassword := range randomSecret.Data { password, err := generateRandomPassword(randomPassword.Length, randomPassword.Special) if err != nil { log.Printf("Error generating password for key '%s': %v", randomPassword.Key, err) continue } secretData[randomPassword.Key] = []byte(password) } newSecret := &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, Data: secretData, } _, err := client.CoreV1().Secrets(namespace).Create(context.Background(), newSecret, metav1.CreateOptions{}) if err != nil { return fmt.Errorf("Unable to create secret: %v", err) } log.Printf("Secret '%s' created successfully.", name) } else { // Secret exists, check for new keys for _, randomKey := range randomSecret.Data { if _, exists := secret.Data[randomKey.Key]; !exists { // New key found, generate new password log.Printf("New key '%s' found in config for secret '%s', generating new password", randomKey.Key, name) password, err := generateRandomPassword(randomKey.Length, randomKey.Special) if err != nil { log.Printf("Error generating password for key '%s': %v", randomKey.Key, err) continue } secret.Data[randomKey.Key] = []byte(password) } } // Update the secret _, err := client.CoreV1().Secrets(namespace).Update(context.Background(), secret, metav1.UpdateOptions{}) if err != nil { return fmt.Errorf("Unable to update secret: %v", err) } } return nil } func main() { configFilename := "./config.yaml" randomSecrets, err := readConfigFile(configFilename) if err != nil { log.Fatalf("Error reading config file: %v", err) } client, err := getClient() if err != nil { log.Fatalf("Unable to create Kubernetes client: %v", err) } for _, randomSecret := range randomSecrets { err := createOrUpdateSecret(client, randomSecret.Name, randomSecret) if err != nil { log.Printf("Error processing secret %s: %v", randomSecret.Name, err) } } } ================================================ FILE: platform/global-secrets/templates/clustersecretstore/clustersecretstore.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ClusterSecretStore metadata: name: global-secrets spec: provider: kubernetes: remoteNamespace: {{ .Release.Namespace }} server: caProvider: type: ConfigMap name: kube-root-ca.crt namespace: {{ .Release.Namespace }} key: ca.crt auth: serviceAccount: name: external-secrets-kubernetes-global-secrets namespace: {{ .Release.Namespace }} ================================================ FILE: platform/global-secrets/templates/clustersecretstore/role.yaml ================================================ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: external-secrets-kubernetes-global-secrets namespace: {{ .Release.Namespace }} rules: - apiGroups: - "" resources: - secrets verbs: - get - list - watch - apiGroups: - authorization.k8s.io resources: - selfsubjectrulesreviews verbs: - create ================================================ FILE: platform/global-secrets/templates/clustersecretstore/rolebinding.yaml ================================================ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: external-secrets-kubernetes-global-secrets namespace: {{ .Release.Namespace }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: external-secrets-kubernetes-global-secrets subjects: - kind: ServiceAccount name: external-secrets-kubernetes-global-secrets namespace: {{ .Release.Namespace }} ================================================ FILE: platform/global-secrets/templates/clustersecretstore/serviceaccount.yaml ================================================ apiVersion: v1 kind: ServiceAccount metadata: name: external-secrets-kubernetes-global-secrets namespace: {{ .Release.Namespace }} ================================================ FILE: platform/global-secrets/templates/secret-generator/configmap.yaml ================================================ apiVersion: v1 kind: ConfigMap metadata: name: secret-generator namespace: {{ .Release.Namespace }} data: {{ (.Files.Glob "files/secret-generator/*").AsConfig | indent 2 }} ================================================ FILE: platform/global-secrets/templates/secret-generator/job.yaml ================================================ apiVersion: batch/v1 kind: Job metadata: name: secret-generator-{{ include (print $.Template.BasePath "/secret-generator/configmap.yaml") . | sha256sum | trunc 7 }} namespace: {{ .Release.Namespace }} spec: backoffLimit: 3 template: spec: restartPolicy: Never containers: - name: secret-generator image: golang:1.19-alpine workingDir: /go/src/secret-generator command: - sh - -c args: - | go get . go run . volumeMounts: - name: source mountPath: /go/src/secret-generator serviceAccount: secret-generator volumes: - name: source configMap: name: secret-generator ================================================ FILE: platform/global-secrets/templates/secret-generator/role.yaml ================================================ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: secret-generator namespace: {{ .Release.Namespace }} rules: - apiGroups: - "" resources: - secrets verbs: - get - list - create - update - patch - apiGroups: - authorization.k8s.io resources: - selfsubjectrulesreviews verbs: - create ================================================ FILE: platform/global-secrets/templates/secret-generator/rolebinding.yaml ================================================ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: secret-generator namespace: {{ .Release.Namespace }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: secret-generator subjects: - kind: ServiceAccount name: secret-generator namespace: {{ .Release.Namespace }} ================================================ FILE: platform/global-secrets/templates/secret-generator/serviceaccount.yaml ================================================ apiVersion: v1 kind: ServiceAccount metadata: name: secret-generator namespace: {{ .Release.Namespace }} ================================================ FILE: platform/grafana/Chart.yaml ================================================ apiVersion: v2 name: grafana version: 0.0.0 dependencies: - name: grafana repository: https://grafana.github.io/helm-charts version: 7.3.3 ================================================ FILE: platform/grafana/templates/secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: grafana-secrets namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets target: name: grafana-secrets data: - secretKey: GRAFANA_SSO_CLIENT_SECRET remoteRef: key: dex.grafana property: client_secret ================================================ FILE: platform/grafana/values.yaml ================================================ grafana: ingress: enabled: true ingressClassName: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - &host grafana.khuedoan.com tls: - secretName: grafana-general-tls hosts: - *host sidecar: dashboards: enabled: true searchNamespace: monitoring-system datasources: enabled: true searchNamespace: monitoring-system envFromSecret: grafana-secrets grafana.ini: server: root_url: https://grafana.khuedoan.com auth.generic_oauth: enabled: true allow_sign_up: true name: Dex client_id: grafana-sso client_secret: $__env{GRAFANA_SSO_CLIENT_SECRET} scopes: openid profile email groups auth_url: https://dex.khuedoan.com/auth token_url: https://dex.khuedoan.com/token api_url: https://dex.khuedoan.com/userinfo ================================================ FILE: platform/kanidm/Chart.yaml ================================================ apiVersion: v2 name: kanidm version: 0.0.0 dependencies: - name: app-template version: 2.2.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: platform/kanidm/templates/certificate.yaml ================================================ # TODO https://github.com/kanidm/kanidm/issues/1227 apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: kanidm-selfsigned namespace: {{ .Release.Namespace }} spec: secretName: kanidm-selfsigned-certificate issuerRef: kind: Issuer name: kanidm-selfsigned dnsNames: - home.arpa ================================================ FILE: platform/kanidm/templates/issuer.yaml ================================================ apiVersion: cert-manager.io/v1 kind: Issuer metadata: name: kanidm-selfsigned namespace: {{ .Release.Namespace }} spec: selfSigned: {} ================================================ FILE: platform/kanidm/values.yaml ================================================ app-template: controllers: main: type: statefulset containers: main: image: repository: docker.io/kanidm/server tag: 1.3.3 statefulset: volumeClaimTemplates: - name: data size: 1Gi globalMounts: - path: /data accessMode: "ReadWriteOnce" configMaps: config: enabled: true data: server.toml: | bindaddress = "[::]:443" ldapbindaddress = "[::]:636" trust_x_forward_for = true db_path = "/data/kanidm.db" tls_chain = "/data/ca.crt" tls_key = "/data/tls.key" domain = "auth.khuedoan.com" origin = "https://auth.khuedoan.com" service: main: ports: http: enabled: false https: port: 443 protocol: HTTPS ldap: port: 636 protocol: TCP ingress: main: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod nginx.ingress.kubernetes.io/backend-protocol: HTTPS hosts: - host: &host auth.khuedoan.com paths: - path: / pathType: Prefix service: name: main port: https tls: - hosts: - *host secretName: kanidm-tls-certificate persistence: config: enabled: true type: configMap name: kanidm-config globalMounts: - path: /data/server.toml subPath: server.toml tls: enabled: true type: secret name: kanidm-selfsigned-certificate globalMounts: - path: /data/ca.crt subPath: ca.crt - path: /data/tls.key subPath: tls.key ================================================ FILE: platform/renovate/Chart.yaml ================================================ apiVersion: v2 name: renovate version: 0.0.0 dependencies: - name: renovate version: 31.97.3 repository: https://docs.renovatebot.com/helm-charts ================================================ FILE: platform/renovate/templates/secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: {{ .Values.renovate.existingSecret }} namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets target: template: engineVersion: v2 data: RENOVATE_TOKEN: {{` "{{ .token }}" `}} data: - secretKey: token remoteRef: key: gitea.renovate property: token ================================================ FILE: platform/renovate/values.yaml ================================================ renovate: cronjob: schedule: '0 9 * * *' # Everyday at 09:00 renovate: config: | { "platform": "gitea", "endpoint": "https://git.khuedoan.com/api/v1", "gitAuthor": "Renovate Bot ", "autodiscover": true } existingSecret: renovate-secret ================================================ FILE: platform/woodpecker/Chart.yaml ================================================ apiVersion: v2 name: woodpecker version: 0.0.0 dependencies: - name: woodpecker version: 1.5.1 repository: https://woodpecker-ci.org ================================================ FILE: platform/woodpecker/templates/secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: woodpecker-secret namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets data: - secretKey: WOODPECKER_GITEA_CLIENT remoteRef: key: gitea.woodpecker property: client_id - secretKey: WOODPECKER_GITEA_SECRET remoteRef: key: gitea.woodpecker property: client_secret - secretKey: WOODPECKER_AGENT_SECRET remoteRef: key: woodpecker.agent property: secret ================================================ FILE: platform/woodpecker/values.yaml ================================================ woodpecker: agent: replicaCount: 2 env: WOODPECKER_BACKEND_K8S_STORAGE_RWX: false # Agents will spawn pods to run workflow steps using the # Kubernetes backend instead of running them directly on # the agent pod, so we can run many workflows per agent. WOODPECKER_MAX_WORKFLOWS: 10 server: env: WOODPECKER_HOST: https://ci.khuedoan.com WOODPECKER_WEBHOOK_HOST: http://woodpecker-server.woodpecker WOODPECKER_GITEA: true WOODPECKER_GITEA_URL: https://git.khuedoan.com WOODPECKER_OPEN: true WOODPECKER_ADMIN: gitea_admin ingress: enabled: true annotations: cert-manager.io/cluster-issuer: letsencrypt-prod ingressClassName: nginx hosts: - host: &host ci.khuedoan.com paths: - path: / tls: - secretName: woodpecker-tls-certificate hosts: - *host ================================================ FILE: platform/zot/Chart.yaml ================================================ apiVersion: v2 name: zot version: 0.0.0 dependencies: - name: zot version: 0.1.52 repository: http://zotregistry.dev/helm-charts ================================================ FILE: platform/zot/templates/admin-secret.yaml ================================================ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: registry-admin-secret namespace: {{ .Release.Namespace }} spec: secretStoreRef: kind: ClusterSecretStore name: global-secrets target: template: engineVersion: v2 data: username: admin password: {{` "{{ .password }}" `}} data: - secretKey: password remoteRef: key: registry.admin property: password ================================================ FILE: platform/zot/values.yaml ================================================ zot: ingress: enabled: true annotations: cert-manager.io/cluster-issuer: letsencrypt-prod nginx.ingress.kubernetes.io/proxy-body-size: "0" className: nginx hosts: - host: &host registry.khuedoan.com paths: - path: / tls: - secretName: zot-tls-certificate hosts: - *host # TODO enable auth persistence: true pvc: create: true storage: 10Gi ================================================ FILE: renovate.json5 ================================================ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:base" ], "packageRules": [ { "matchPackagePatterns": [ "*" ], "matchUpdateTypes": [ "minor", "patch" ], "groupName": "all non-major dependencies", "groupSlug": "all-minor-patch" } ] } ================================================ FILE: scripts/argocd-admin-password ================================================ #!/bin/sh echo "WARNING: ArgoCD admin can do anything in the cluster, only use it for just enough initial setup or in emergencies." >&2 export KUBECONFIG=./metal/kubeconfig.yaml kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d ================================================ FILE: scripts/backup ================================================ #!/usr/bin/env python import argparse from kubernetes import client, config from kubernetes.client.rest import ApiException config.load_kube_config() arg_parser = argparse.ArgumentParser() arg_parser.add_argument("--namespace", required=True) arg_parser.add_argument("--pvc", required=True) arg_parser.add_argument("--action", required=True) args = arg_parser.parse_args() namespace = args.namespace pvc = args.pvc secret = f"{pvc}-backup-repository" def apply_custom_resource(api, group, version, plural, name, namespace, body): try: # Check if the resource exists api.get_namespaced_custom_object( group=group, version=version, namespace=namespace, plural=plural, name=name, ) print(f"Patching {body['kind']} {name}") api.patch_namespaced_custom_object( group=group, version=version, namespace=namespace, plural=plural, name=name, body=body, ) except ApiException as e: if e.status == 404: print(f"Creating {body['kind']} {name}") api.create_namespaced_custom_object( group=group, version=version, namespace=namespace, plural=plural, body=body, ) else: raise e apply_custom_resource( api=client.CustomObjectsApi(), group="external-secrets.io", version="v1beta1", plural="externalsecrets", name=secret, namespace=namespace, body={ "apiVersion": "external-secrets.io/v1beta1", "kind": "ExternalSecret", "metadata": { "name": secret, "namespace": namespace, "annotations": { "app.kubernetes.io/managed-by": "scripts/backup", }, }, "spec": { "secretStoreRef": { "kind": "ClusterSecretStore", "name": "global-secrets", }, "data": [ { "remoteRef": { "key": "external", "property": "restic-s3-bucket", }, "secretKey": "restic_s3_bucket", }, { "remoteRef": { "key": "external", "property": "restic-s3-access-key", }, "secretKey": "restic_s3_access_key", }, { "remoteRef": { "key": "external", "property": "restic-s3-secret-key", }, "secretKey": "restic_s3_secret_key", }, { "remoteRef": { "key": "external", "property": "restic-password", }, "secretKey": "restic_password", }, ], "target": { "template": { "data": { "RESTIC_REPOSITORY": f"s3:{{{{ .restic_s3_bucket }}}}/{namespace}/{pvc}", "RESTIC_PASSWORD": "{{ .restic_password }}", "AWS_ACCESS_KEY_ID": "{{ .restic_s3_access_key }}", "AWS_SECRET_ACCESS_KEY": "{{ .restic_s3_secret_key }}", } } }, }, }, ) if args.action == "setup": apply_custom_resource( api=client.CustomObjectsApi(), group="volsync.backube", version="v1alpha1", plural="replicationsources", name=pvc, namespace=namespace, body={ "apiVersion": "volsync.backube/v1alpha1", "kind": "ReplicationSource", "metadata": { "name": pvc, "namespace": namespace, "annotations": { "app.kubernetes.io/managed-by": "scripts/backup", }, }, "spec": { "sourcePVC": pvc, "trigger": {"schedule": "*/30 * * * *"}, "restic": { "pruneIntervalDays": 14, "repository": secret, "retain": { "hourly": 6, "daily": 5, "weekly": 4, "monthly": 2, "yearly": 1, }, "copyMethod": "Snapshot", }, }, }, ) elif args.action == "restore": apply_custom_resource( api=client.CustomObjectsApi(), group="volsync.backube", version="v1alpha1", plural="replicationdestinations", name=pvc, namespace=namespace, body={ "apiVersion": "volsync.backube/v1alpha1", "kind": "ReplicationDestination", "metadata": { "name": pvc, "namespace": namespace, "annotations": { "app.kubernetes.io/managed-by": "scripts/backup", }, }, "spec": { "trigger": {"manual": "restore-once"}, "restic": { "repository": secret, "destinationPVC": pvc, "copyMethod": "Direct", }, }, }, ) else: raise ValueError(f"Invalid action: {args.action}") ================================================ FILE: scripts/configure ================================================ #!/usr/bin/env python # WIP # TODO clean this up """ Basic configure script for new users """ import fileinput import subprocess import sys from rich.prompt import Confirm, Prompt upstream_config = { "seed_repo": "https://github.com/khuedoan/homelab", "domain": "khuedoan.com", "timezone": "Asia/Ho_Chi_Minh", "terraform_workspace": "khuedoan", "loadbalancer_ip_range": "192.168.1.224/27", } def check_python_version(required_version: str) -> None: if sys.version_info < tuple(map(int, required_version.split('.'))): raise Exception(f"Must be using Python >= {required_version}") def find_and_replace(pattern: str, replacement: str, paths: list[str]) -> None: files_with_matches = subprocess.run( ["git", "grep", "--files-with-matches", pattern, "--"] + paths, capture_output=True, text=True ).stdout.splitlines() for file_with_maches in files_with_matches: with fileinput.FileInput(file_with_maches, inplace=True) as file: for line in file: print(line.replace(pattern, replacement), end='') def main() -> None: check_python_version( required_version='3.10.0' ) editor = Prompt.ask("Select text editor", default='nvim') domain = Prompt.ask("Enter your domain", default=upstream_config['domain']) seed_repo = Prompt.ask("Enter seed repo", default=upstream_config['seed_repo']) timezone = Prompt.ask("Enter time zone", default=upstream_config['timezone']) loadbalancer_ip_range = Prompt.ask("Enter IP range for load balancer", default=upstream_config['loadbalancer_ip_range']) find_and_replace( pattern=upstream_config['domain'], replacement=domain, paths=[ ".ci", "apps", "platform", "system", "external" ] ) find_and_replace( pattern=upstream_config['seed_repo'], replacement=seed_repo, paths=[ "system", "platform" ] ) find_and_replace( pattern=upstream_config['timezone'], replacement=timezone, paths=[ "apps", "system", "metal" ] ) find_and_replace( pattern=upstream_config['loadbalancer_ip_range'], replacement=loadbalancer_ip_range, paths=[ "metal/inventories/prod.yml", "apps/tailscale/values.yaml", ] ) if Confirm.ask("Update server list?", default=True): subprocess.run( [editor, 'metal/inventories/prod.yml'] ) if Confirm.ask("Do you want to use managed services?"): terraform_workspace = Prompt.ask("Enter Terraform Workspace", default=upstream_config['terraform_workspace']) find_and_replace( pattern=upstream_config['terraform_workspace'], replacement=terraform_workspace, paths=[ "external/versions.tf" ] ) if __name__ == '__main__': main() ================================================ FILE: scripts/get-dns-config ================================================ #!/bin/sh export KUBECONFIG=./metal/kubeconfig.yaml kubectl get ingress --all-namespaces --no-headers --output custom-columns="ADDRESS:.status.loadBalancer.ingress[0].ip,HOST:.spec.rules[0].host" ================================================ FILE: scripts/get-status ================================================ #!/bin/sh export KUBECONFIG=./metal/kubeconfig.yaml kubectl get applicationsets --namespace argocd kubectl get applications --namespace argocd kubectl get ingress --all-namespaces ================================================ FILE: scripts/get-wireguard-config ================================================ #!/bin/sh set -eu PEER="${1}" export KUBECONFIG=./metal/kubeconfig.yaml kubectl -n wireguard exec -it deployment/wireguard -- /app/show-peer "${PEER}" kubectl -n wireguard exec -it deployment/wireguard -- cat "/config/peer_${PEER}/peer_${PEER}.conf" ================================================ FILE: scripts/hacks ================================================ #!/usr/bin/env python """ Quick and dirty script for things that I can't/don't have time to do properly yet TODO: retire this script """ import base64 import json import json import pexpect import requests import subprocess import sys import urllib from rich.console import Console from kubernetes import client, config from kubernetes.stream import stream # https://git.khuedoan.com/user/settings/applications # Doing this properly inside the cluster requires: # - Kubernetes service account config.load_config() gitea_host = client.NetworkingV1Api().read_namespaced_ingress('gitea', 'gitea').spec.rules[0].host gitea_user_secret = client.CoreV1Api().read_namespaced_secret('gitea-admin-secret', 'gitea') gitea_user = base64.b64decode(gitea_user_secret.data['username']).decode("utf-8") gitea_pass = base64.b64decode(gitea_user_secret.data['password']).decode("utf-8") gitea_url = f"http://{gitea_host}" kanidm_host = client.NetworkingV1Api().read_namespaced_ingress('kanidm', 'kanidm').spec.rules[0].host def apply_secret(name: str, namespace: str, data: dict) -> None: try: client.CoreV1Api().read_namespaced_secret(name, namespace) patch_body = client.V1Secret( metadata=client.V1ObjectMeta(name=name), data=data, ) client.CoreV1Api().replace_namespaced_secret(name, namespace, patch_body) except client.exceptions.ApiException: # Secret doesn't exist, create a new one new_secret = client.V1Secret( metadata=client.V1ObjectMeta(name=name), data=data, ) client.CoreV1Api().create_namespaced_secret(namespace, new_secret) def setup_gitea_access_token(name: str, scopes: list[str]) -> None: current_tokens = requests.get( url=f"{gitea_url}/api/v1/users/{gitea_user}/tokens", auth=(gitea_user,gitea_pass), ).json() if not any(token['name'] == name for token in current_tokens): resp = requests.post( url=f"{gitea_url}/api/v1/users/{gitea_user}/tokens", auth=(gitea_user,gitea_pass), headers={ 'Content-Type': 'application/json' }, data=json.dumps({ 'name': name, 'scopes': scopes }) ) if resp.status_code == 201: apply_secret( f"gitea.{name}", "global-secrets", { 'token': base64.b64encode(resp.json()['sha1'].encode("utf-8")).decode("utf-8") } ) else: print(f"Error creating access token {name} ({resp.status_code})") print(resp.content) sys.exit(1) def setup_gitea_oauth_app(name: str, redirect_uri: str) -> None: # TODO use the new global application, while it's there in the UI, there's no API yet. current_apps = requests.get( url=f"{gitea_url}/api/v1/user/applications/oauth2", auth=(gitea_user,gitea_pass), ).json() if not any(app['name'] == name for app in current_apps): resp = requests.post( url=f"{gitea_url}/api/v1/user/applications/oauth2", auth=(gitea_user,gitea_pass), headers={ 'Content-Type': 'application/json' }, data=json.dumps({ 'name': name, 'redirect_uris': [redirect_uri], 'confidential_client': True }) ) if resp.status_code == 201: apply_secret( f"gitea.{name}", "global-secrets", { 'client_id': base64.b64encode(resp.json()['client_id'].encode("utf-8")).decode("utf-8"), 'client_secret': base64.b64encode(resp.json()['client_secret'].encode("utf-8")).decode("utf-8"), } ) else: print(f"Error creating OAuth application {name} ({resp.status_code})") print(resp.content) sys.exit(1) def setup_gitea_auth_with_dex(): gitea_pod = client.CoreV1Api().list_namespaced_pod(namespace='gitea', label_selector='app=gitea').items[0].metadata.name client_secret = base64.b64decode( client.CoreV1Api().read_namespaced_secret('dex.gitea', 'global-secrets').data['client_secret'] ).decode("utf-8") discovery_url = f"https://{client.NetworkingV1Api().read_namespaced_ingress('dex', 'dex').spec.rules[0].host}/.well-known/openid-configuration" # TODO currently there's no API to add new authentication sources in Gitea, # so we have to workaround by running Gitea CLI in a Gitea pod. stream( client.CoreV1Api().connect_get_namespaced_pod_exec, gitea_pod, 'gitea', command=[ 'gitea', 'admin', 'auth', 'add-oauth', '--name', 'Dex', '--provider', 'openidConnect', '--key', 'gitea', '--secret', client_secret, '--auto-discover-url', discovery_url ], stderr=True, stdin=False, stdout=False, tty=False ) def reset_kanidm_account_password(account: str) -> str: resp = stream( client.CoreV1Api().connect_get_namespaced_pod_exec, 'kanidm-0', 'kanidm', command=["kanidmd", "recover-account", "--output", "json", account], stderr=False, stdin=False, stdout=True, tty=False ).splitlines()[-1] return json.loads(resp)['password'] # TODO Proper automation will be added later, waiting for client library update: # https://github.com/kanidm/kanidm/pull/2301 def kanidm_login(accounts: list[str]) -> None: for account in accounts: password = reset_kanidm_account_password(account) # There's no way to input password using the standard library, so we have to use pexpect # https://stackoverflow.com/questions/2387731/use-subprocess-to-send-a-password cli_login = pexpect.spawn(f"kanidm login --url https://{kanidm_host} --name {account}") cli_login.sendline(password) cli_login.read() def setup_kanidm_group(name: str) -> None: subprocess.run( ["kanidm", "group", "create", "--url", f"https://{kanidm_host}", "--name", "idm_admin", name], capture_output=True, ) def setup_kanidm_oauth_app(name: str, redirect_uri: str) -> None: try: subprocess.run( ["kanidm", "system", "oauth2", "create", "--url", f"https://{kanidm_host}", "--name", "idm_admin", name, name, redirect_uri], capture_output=True, check=True, ) except subprocess.CalledProcessError: return # TODO https://github.com/dexidp/dex/pull/3188 subprocess.run( ["kanidm", "system", "oauth2", "warning-insecure-client-disable-pkce", "--url", f"https://{kanidm_host}", "--name", "idm_admin", name], capture_output=True, check=True, ) subprocess.run( # TODO better group management ["kanidm", "system", "oauth2", "create-scope-map", "--url", f"https://{kanidm_host}", "--name", "idm_admin", name, "editor", "openid", "profile", "email", "groups"], capture_output=True, check=True, ) client_secret = json.loads(subprocess.run( ["kanidm", "system", "oauth2", "show-basic-secret", "--url", f"https://{kanidm_host}", "--name", "idm_admin", "--output", "json", name], capture_output=True, check=True, ).stdout.decode("utf-8"))['secret'] apply_secret( f"kanidm.{name}", "global-secrets", { 'client_id': base64.b64encode(name.encode("utf-8")).decode("utf-8"), 'client_secret': base64.b64encode(client_secret.encode("utf-8")).decode("utf-8"), } ) def main() -> None: with Console().status("Completing the remaining sorcery"): gitea_access_tokens = [ { 'name': 'renovate', 'scopes': [ "write:repository", "read:user", "write:issue", "read:organization", "read:misc" ] } ] gitea_oauth_apps = [ {'name': 'woodpecker', 'redirect_uri': f"https://{client.NetworkingV1Api().read_namespaced_ingress('woodpecker-server', 'woodpecker').spec.rules[0].host}/authorize"}, ] kanidm_groups = [ # TODO better group management {'name': 'editor'}, ] kanidm_oauth_apps = [ {'name': 'dex', 'redirect_uri': f"https://{client.NetworkingV1Api().read_namespaced_ingress('dex', 'dex').spec.rules[0].host}/callback"}, ] for token in gitea_access_tokens: setup_gitea_access_token(token['name'], token['scopes']) for app in gitea_oauth_apps: setup_gitea_oauth_app(app['name'], app['redirect_uri']) setup_gitea_auth_with_dex() kanidm_login(["admin", "idm_admin"]) for group in kanidm_groups: setup_kanidm_group(group['name']) for app in kanidm_oauth_apps: setup_kanidm_oauth_app(app['name'], app['redirect_uri']) if __name__ == '__main__': main() ================================================ FILE: scripts/helm-diff ================================================ #!/usr/bin/env python from argparse import ArgumentParser from glob import glob from os import path from subprocess import run from tempfile import mkdtemp, NamedTemporaryFile def clone_repository(repo, branch, target_path): run( ['git', 'clone', repo, '--depth', '1', '--branch', branch, target_path], check=True ) def render_helm_chart(chart_path, namespace, release_name, rendered_path): # Even if there is no Helm chart at the specified chart path, do not raise an error. # This accommodates cases where the entire chart is removed, or a new chart is added. # In such cases, the rendered file will simply be empty. if path.isdir(chart_path): run( ['helm', 'dependency', 'update', chart_path], check=True ) run( ['helm', 'template', '--namespace', namespace, release_name, chart_path], stdout=open(rendered_path, 'w'), check=True ) def changed_charts(source_path, target_path, subpath): changed_charts = [] # Convert to set for deduplication all_charts = set( glob(f"*", root_dir=f"{source_path}/{subpath}") + glob(f"*", root_dir=f"{target_path}/{subpath}") ) for chart in all_charts: source_chart_path = path.join(source_path, subpath, chart) target_chart_path = path.join(target_path, subpath, chart) if run(['diff', source_chart_path, target_chart_path], capture_output=True).returncode != 0: changed_charts.append(chart) return changed_charts def main(): parser = ArgumentParser(description='Compare Helm charts in a directory between two Git revisions.') parser.add_argument('--repository', required=True, help='Repository to clone') parser.add_argument('--source', required=True, help='Source branch (e.g. pull request branch)') parser.add_argument('--target', required=True, help='Target branch (e.g. master branch)') parser.add_argument('--subpath', required=True, help='Subpath containing the charts (e.g. system)') args = parser.parse_args() source_path = mkdtemp() target_path = mkdtemp() clone_repository(args.repository, args.source, source_path) clone_repository(args.repository, args.target, target_path) for chart in changed_charts(source_path, target_path, args.subpath): with NamedTemporaryFile(suffix='.yaml', mode='w+', delete=False) as f_source, NamedTemporaryFile(suffix='.yaml', mode='w+', delete=False) as f_target: render_helm_chart(f"{source_path}/{args.subpath}/{chart}", chart, chart, f_source.name) render_helm_chart(f"{target_path}/{args.subpath}/{chart}", chart, chart, f_target.name) diff_result = run( ['dyff', 'between', '--omit-header', '--use-go-patch-style', '--color=on', '--truecolor=off', f_target.name, f_source.name], capture_output=True, text=True, check=True ) print(diff_result.stdout) if __name__ == "__main__": main() ================================================ FILE: scripts/kanidm-reset-password ================================================ #!/bin/sh set -eu account="${1}" echo "WARNING: Kanidm admin can do anything in the cluster, only use it for just enough initial setup or in emergencies." >&2 export KUBECONFIG=./metal/kubeconfig.yaml kubectl exec -it -n kanidm statefulset/kanidm -- kanidmd recover-account "${account}" ================================================ FILE: scripts/new-service ================================================ #!/bin/sh mkdir -p "apps/${1}" cat << EOT > "apps/${1}/Chart.yaml" apiVersion: v2 name: CHANGEME version: 0.0.0 dependencies: - name: CHANGEME version: CHANGEME repository: CHANGEME EOT touch "apps/${1}/values.yaml" ================================================ FILE: scripts/onboard-user ================================================ #!/bin/sh username="${1}" fullname="${2}" mail="${3}" export KUBECONFIG=./metal/kubeconfig.yaml host="$(kubectl get ingress --namespace kanidm kanidm --output jsonpath='{.spec.rules[0].host}')" kanidm person create "${username}" "${fullname}" --url "https://${host}" --name idm_admin kanidm person update "${username}" --url "https://${host}" --name idm_admin --mail "${mail}" # TODO better group management kanidm group add-members "editor" "${username}" --url "https://${host}" --name idm_admin kanidm person credential create-reset-token "${username}" --url "https://${host}" --name idm_admin ================================================ FILE: scripts/pxe-logs ================================================ #!/bin/sh docker compose \ --project-directory ./metal/roles/pxe_server/files/ \ logs \ --follow \ "${@}" ================================================ FILE: scripts/take-screenshots ================================================ #!/usr/bin/env python # WIP # - [x] take screenshot # - [ ] self contained # - [ ] login automatically credentials from Kubernetes Secrets (is this really needed?) # TODO put this in ../flake.nix or use Docker # pip install selenium # sudo pacman -S geckodriver import time from selenium import webdriver apps = [ { 'name': 'home', 'url': 'https://home.khuedoan.com' }, { 'name': 'gitea', 'url': 'https://git.khuedoan.com/ops/homelab' }, { 'name': 'argocd', 'url': 'https://argocd.khuedoan.com/applications/root' }, { 'name': 'matrix', 'url': 'https://chat.khuedoan.com/#/room/#random:matrix.khuedoan.com' }, { 'name': 'grafana', 'url': 'https://grafana.khuedoan.com/d/efa86fd1d0c121a26444b636a3f509a8/kubernetes-compute-resources-cluster' # wtf is this ID }, ] options = webdriver.firefox.options.Options() options.headless = True driver = webdriver.Firefox( options=options, firefox_profile=webdriver.FirefoxProfile( # TODO deprecated profile_directory="/home/khuedoan/.mozilla/firefox/h05irklw.default-release" # TODO do not hard code ) ) driver.set_window_size(1920, 1080) for app in apps: print(f"Opening {app['url']}") driver.get(app['url']) time.sleep(3) # TODO wait for full page load instead of sleep driver.save_screenshot(f"{app['name']}.png") print(f"Screenshot saved to {app['name']}.png") driver.close() ================================================ FILE: system/Makefile ================================================ .POSIX: export KUBECONFIG = $(shell pwd)/../metal/kubeconfig.yaml .PHONY: bootstrap bootstrap: ansible-playbook \ bootstrap.yml ================================================ FILE: system/argocd/Chart.yaml ================================================ apiVersion: v2 name: argocd version: 0.0.0 dependencies: - name: argo-cd version: 7.5.2 repository: https://argoproj.github.io/argo-helm - name: argocd-apps version: 2.0.0 repository: https://argoproj.github.io/argo-helm ================================================ FILE: system/argocd/values-seed.yaml ================================================ argo-cd: server: metrics: &metrics enabled: false serviceMonitor: enabled: false controller: metrics: *metrics repoServer: metrics: *metrics redis: metrics: *metrics argocd-apps: applicationsets: root: generators: - git: repoURL: &repoURL https://github.com/khuedoan/homelab revision: &revision master directories: - path: system/* - path: platform/* - path: apps/* template: spec: source: repoURL: *repoURL targetRevision: *revision ================================================ FILE: system/argocd/values.yaml ================================================ argo-cd: global: domain: argocd.khuedoan.com configs: params: server.insecure: true controller.diff.server.side: true cm: resource.ignoreResourceUpdatesEnabled: true resource.customizations.ignoreResourceUpdates.all: | jsonPointers: - /status server: ingress: enabled: true ingressClassName: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod tls: true metrics: &metrics enabled: true serviceMonitor: enabled: true dex: enabled: false controller: metrics: *metrics repoServer: metrics: *metrics redis: metrics: *metrics argocd-apps: applicationsets: root: namespace: argocd generators: - git: repoURL: &repoURL http://gitea-http.gitea:3000/ops/homelab revision: &revision master directories: - path: system/* - path: platform/* - path: apps/* template: metadata: name: '{{path.basename}}' spec: destination: name: in-cluster namespace: '{{path.basename}}' project: default # TODO source: repoURL: *repoURL path: '{{path}}' targetRevision: *revision syncPolicy: automated: prune: true selfHeal: true retry: limit: 10 backoff: duration: 1m factor: 2 maxDuration: 16m syncOptions: - CreateNamespace=true - ApplyOutOfSyncOnly=true - ServerSideApply=true managedNamespaceMetadata: annotations: # Enable privileged VolSync movers by default for all namespaces # TODO this may be refactored in the future for finer granularity # See also https://volsync.readthedocs.io/en/stable/usage/permissionmodel.html volsync.backube/privileged-movers: "true" ================================================ FILE: system/bootstrap.yml ================================================ - name: Bootstrapping the cluster hosts: localhost tasks: - name: Create ArgoCD namespace kubernetes.core.k8s: api_version: v1 kind: Namespace name: argocd state: present - name: Check if this is the first installation kubernetes.core.k8s_info: kind: Pod label_selectors: - app.kubernetes.io/instance=gitea field_selectors: - status.phase=Running register: first_install - name: Render ArgoCD manifests from Helm chart kubernetes.core.helm_template: chart_ref: ./argocd include_crds: true release_name: argocd release_namespace: argocd dependency_update: true values_files: - "argocd/{{ (first_install.resources | length == 0) | ternary('values-seed.yaml', 'values.yaml') }}" register: argocd_manifests - name: Apply ArgoCD manifests kubernetes.core.k8s: resource_definition: "{{ argocd_manifests.stdout }}" apply: true server_side_apply: field_manager: argocd-controller ================================================ FILE: system/cert-manager/Chart.yaml ================================================ apiVersion: v2 name: cert-manager version: 0.0.0 dependencies: - name: cert-manager version: v1.15.3 repository: https://charts.jetstack.io ================================================ FILE: system/cert-manager/templates/clusterissuer.yaml ================================================ apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-prod spec: acme: server: https://acme-v02.api.letsencrypt.org/directory privateKeySecretRef: name: letsencrypt-prod solvers: - dns01: cloudflare: apiTokenSecretRef: name: cloudflare-api-token key: api-token ================================================ FILE: system/cert-manager/values.yaml ================================================ cert-manager: installCRDs: true prometheus: enabled: true servicemonitor: enabled: true ================================================ FILE: system/cloudflared/Chart.yaml ================================================ apiVersion: v2 name: cloudflared version: 0.0.0 dependencies: - name: app-template version: 3.1.0 repository: https://bjw-s-labs.github.io/helm-charts ================================================ FILE: system/cloudflared/values.yaml ================================================ app-template: controllers: cloudflared: containers: app: image: repository: docker.io/cloudflare/cloudflared tag: 2024.4.0 args: - tunnel - --config - /etc/cloudflared/config.yaml - run configMaps: config: enabled: true data: config.yaml: | tunnel: homelab credentials-file: /etc/cloudflared/credentials.json metrics: 0.0.0.0:2000 no-autoupdate: true ingress: - hostname: '*.khuedoan.com' service: https://ingress-nginx-controller.ingress-nginx originRequest: noTLSVerify: true - service: http_status:404 persistence: config: enabled: true type: configMap name: cloudflared-config globalMounts: - path: /etc/cloudflared/config.yaml subPath: config.yaml credentials: enabled: true type: secret # Created by ../../external/cloudflared name: cloudflared-credentials globalMounts: - path: /etc/cloudflared/credentials.json subPath: credentials.json ================================================ FILE: system/external-dns/Chart.yaml ================================================ apiVersion: v2 name: external-dns version: 0.0.0 dependencies: - name: external-dns version: 1.14.3 repository: https://kubernetes-sigs.github.io/external-dns ================================================ FILE: system/external-dns/values.yaml ================================================ external-dns: provider: cloudflare txtOwnerId: homelab env: - name: CF_API_TOKEN valueFrom: secretKeyRef: name: cloudflare-api-token key: value extraArgs: - --annotation-filter=external-dns.alpha.kubernetes.io/exclude notin (true) interval: 5m triggerLoopOnEvent: true metrics: enabled: true serviceMonitor: enabled: true ================================================ FILE: system/ingress-nginx/Chart.yaml ================================================ apiVersion: v2 name: ingress-nginx version: 0.0.0 dependencies: - name: ingress-nginx version: 4.11.2 repository: https://kubernetes.github.io/ingress-nginx ================================================ FILE: system/ingress-nginx/values.yaml ================================================ ingress-nginx: controller: admissionWebhooks: timeoutSeconds: 30 metrics: enabled: true serviceMonitor: enabled: true tcp: 22: gitea/gitea-ssh:22 ================================================ FILE: system/kured/Chart.yaml ================================================ apiVersion: v2 name: kured version: 0.0.0 dependencies: - name: kured version: 4.7.0 repository: https://kubereboot.github.io/charts ================================================ FILE: system/kured/values.yaml ================================================ kured: configuration: annotateNodes: true rebootSentinelCommand: sh -c "! needs-restarting --reboothint" timeZone: Asia/Ho_Chi_Minh ================================================ FILE: system/loki/Chart.yaml ================================================ apiVersion: v2 name: loki version: 0.0.0 dependencies: - name: loki-stack version: 2.10.1 repository: https://grafana.github.io/helm-charts ================================================ FILE: system/loki/values.yaml ================================================ loki-stack: loki: serviceMonitor: enabled: true ================================================ FILE: system/monitoring-system/Chart.yaml ================================================ apiVersion: v2 name: kube-prometheus-stack version: 0.0.0 dependencies: - name: kube-prometheus-stack version: 56.19.0 repository: https://prometheus-community.github.io/helm-charts ================================================ FILE: system/monitoring-system/files/webhook-transformer/alertmanager-to-ntfy.jsonnet ================================================ local get_tags(status, severity) = // https://docs.ntfy.sh/emojis if status == "resolved" then ["tada"] else std.get({ critical: ["rotating_light"], warning: ["warning"], info: ["newspaper"], }, severity, ["question"]); local get_priority(status, severity) = // https://docs.ntfy.sh/publish/#message-priority if status == "resolved" then 2 else std.get({ critical: 5, warning: 3, info: 1, }, severity, 3); local get_actions(status, annotations) = // https://docs.ntfy.sh/publish/#action-buttons if status == "resolved" || !("runbook_url" in annotations) then [] else [ { action: "view", label: "Open runbook", url: annotations.runbook_url, }, ]; // TODO support multiple alerts { topic: env.NTFY_TOPIC, title: "[" + std.asciiUpper(body.status) + "] " + body.alerts[0].labels.alertname, message: body.alerts[0].annotations.description, tags: get_tags(body.status, body.alerts[0].labels.severity), priority: get_priority(body.status, body.alerts[0].labels.severity), actions: get_actions(body.status, body.alerts[0].annotations), } ================================================ FILE: system/monitoring-system/templates/configmap.yaml ================================================ apiVersion: v1 kind: ConfigMap metadata: name: webhook-transformer namespace: {{ .Release.Namespace }} data: {{ (.Files.Glob "files/webhook-transformer/*").AsConfig | indent 2 }} ================================================ FILE: system/monitoring-system/values.yaml ================================================ kube-prometheus-stack: grafana: enabled: false forceDeployDatasources: true forceDeployDashboards: true additionalDataSources: - name: Loki type: loki url: http://loki.loki:3100 prometheus: prometheusSpec: ruleSelectorNilUsesHelmValues: false serviceMonitorSelectorNilUsesHelmValues: false podMonitorSelectorNilUsesHelmValues: false probeSelectorNilUsesHelmValues: false alertmanager: alertmanagerSpec: containers: - name: ntfy-relay image: ghcr.io/khuedoan/webhook-transformer:v0.0.3 args: - --port=8081 - --config=/config/alertmanager-to-ntfy.jsonnet - --upstream-host=https://ntfy.sh envFrom: - secretRef: name: webhook-transformer volumeMounts: - name: config mountPath: /config volumes: - name: config configMap: name: webhook-transformer config: route: receiver: ntfy group_by: - namespace group_wait: 30s group_interval: 5m repeat_interval: 12h routes: - receiver: ntfy matchers: - alertname = "Watchdog" receivers: - name: ntfy webhook_configs: - url: http://localhost:8081 send_resolved: true ================================================ FILE: system/rook-ceph/Chart.yaml ================================================ apiVersion: v2 name: rook-ceph version: 0.0.0 dependencies: - name: rook-ceph version: 1.13.5 repository: https://charts.rook.io/release - name: rook-ceph-cluster version: 1.13.5 repository: https://charts.rook.io/release # TODO switch to official chart when there is one # https://github.com/kubernetes-csi/external-snapshotter/issues/812 - name: snapshot-controller version: 2.2.1 repository: https://piraeus.io/helm-charts ================================================ FILE: system/rook-ceph/values.yaml ================================================ rook-ceph: monitoring: enabled: true rook-ceph-cluster: monitoring: enabled: true createPrometheusRules: true cephClusterSpec: mon: count: 3 mgr: count: 2 dashboard: ssl: false logCollector: enabled: false removeOSDsIfOutAndSafeToRemove: true resources: mgr: limits: memory: "1Gi" requests: cpu: "100m" memory: "512Mi" mon: limits: memory: "2Gi" requests: cpu: "100m" memory: "100Mi" osd: limits: memory: "4Gi" requests: cpu: "100m" memory: "512Mi" cephBlockPools: - name: standard-rwo spec: replicated: size: 2 storageClass: enabled: true name: standard-rwo isDefault: true allowVolumeExpansion: true parameters: imageFeatures: layering,fast-diff,object-map,deep-flatten,exclusive-lock csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner csi.storage.k8s.io/provisioner-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner csi.storage.k8s.io/controller-expand-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node csi.storage.k8s.io/node-stage-secret-namespace: "{{ .Release.Namespace }}" cephBlockPoolsVolumeSnapshotClass: enabled: true isDefault: true cephFileSystems: - name: standard-rwx spec: metadataPool: replicated: size: 2 dataPools: - name: data0 replicated: size: 2 metadataServer: activeCount: 1 activeStandby: true resources: limits: memory: "4Gi" requests: cpu: "100m" memory: "100Mi" priorityClassName: system-cluster-critical storageClass: enabled: true name: standard-rwx isDefault: false allowVolumeExpansion: true pool: data0 parameters: csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner csi.storage.k8s.io/provisioner-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner csi.storage.k8s.io/controller-expand-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node csi.storage.k8s.io/node-stage-secret-namespace: "{{ .Release.Namespace }}" cephFileSystemVolumeSnapshotClass: enabled: true isDefault: false cephObjectStores: [] ================================================ FILE: system/volsync-system/Chart.yaml ================================================ apiVersion: v2 name: volsync version: 0.0.0 dependencies: - name: volsync version: 0.9.1 repository: https://backube.github.io/helm-charts ================================================ FILE: test/Makefile ================================================ .POSIX: filter=. default: test test: gotestsum --format testname -- -timeout 30m -run "${filter}" ================================================ FILE: test/benchmark/security/kube-bench.yaml ================================================ # kubectl apply -f kube-bench.yaml # https://github.com/aquasecurity/kube-bench/blob/main/job.yaml apiVersion: batch/v1 kind: Job metadata: name: kube-bench spec: template: metadata: labels: app: kube-bench spec: containers: - command: ["kube-bench"] image: docker.io/aquasec/kube-bench:v0.7.2 name: kube-bench volumeMounts: - name: var-lib-cni mountPath: /var/lib/cni readOnly: true - mountPath: /var/lib/etcd name: var-lib-etcd readOnly: true - mountPath: /var/lib/kubelet name: var-lib-kubelet readOnly: true - mountPath: /var/lib/kube-scheduler name: var-lib-kube-scheduler readOnly: true - mountPath: /var/lib/kube-controller-manager name: var-lib-kube-controller-manager readOnly: true - mountPath: /etc/systemd name: etc-systemd readOnly: true - mountPath: /lib/systemd/ name: lib-systemd readOnly: true - mountPath: /srv/kubernetes/ name: srv-kubernetes readOnly: true - mountPath: /etc/kubernetes name: etc-kubernetes readOnly: true - mountPath: /usr/local/mount-from-host/bin name: usr-bin readOnly: true - mountPath: /etc/cni/net.d/ name: etc-cni-netd readOnly: true - mountPath: /opt/cni/bin/ name: opt-cni-bin readOnly: true hostPID: true restartPolicy: Never volumes: - name: var-lib-cni hostPath: path: /var/lib/cni - hostPath: path: /var/lib/etcd name: var-lib-etcd - hostPath: path: /var/lib/kubelet name: var-lib-kubelet - hostPath: path: /var/lib/kube-scheduler name: var-lib-kube-scheduler - hostPath: path: /var/lib/kube-controller-manager name: var-lib-kube-controller-manager - hostPath: path: /etc/systemd name: etc-systemd - hostPath: path: /lib/systemd name: lib-systemd - hostPath: path: /srv/kubernetes name: srv-kubernetes - hostPath: path: /etc/kubernetes name: etc-kubernetes - hostPath: path: /usr/bin name: usr-bin - hostPath: path: /etc/cni/net.d/ name: etc-cni-netd - hostPath: path: /opt/cni/bin/ name: opt-cni-bin ================================================ FILE: test/benchmark/storage/dbench-rwo.yaml ================================================ # kubectl apply -f dbench-rwo.yaml --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: dbench-rwo spec: storageClassName: standard-rwo accessModes: - ReadWriteOnce resources: requests: storage: 10Gi --- apiVersion: batch/v1 kind: Job metadata: name: dbench-rwo spec: template: spec: containers: - name: dbench image: zayashv/dbench:latest imagePullPolicy: Always env: - name: DBENCH_MOUNTPOINT value: /data - name: DBENCH_QUICK value: "no" volumeMounts: - name: data mountPath: /data restartPolicy: Never volumes: - name: data persistentVolumeClaim: claimName: dbench-rwo ================================================ FILE: test/benchmark/storage/dbench-rwx.yaml ================================================ # kubectl apply -f dbench-rwx.yaml --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: dbench-rwx spec: storageClassName: standard-rwx accessModes: - ReadWriteOnce resources: requests: storage: 10Gi --- apiVersion: batch/v1 kind: Job metadata: name: dbench-rwx spec: template: spec: containers: - name: dbench image: zayashv/dbench:latest imagePullPolicy: Always env: - name: DBENCH_MOUNTPOINT value: /data - name: DBENCH_QUICK value: "no" volumeMounts: - name: data mountPath: /data restartPolicy: Never volumes: - name: data persistentVolumeClaim: claimName: dbench-rwx ================================================ FILE: test/external_test.go ================================================ package test import ( "testing" "github.com/gruntwork-io/terratest/modules/terraform" test_structure "github.com/gruntwork-io/terratest/modules/test-structure" ) func TestTerraformExternal(t *testing.T) { t.Parallel() // Make a copy of the terraform module to a temporary directory. This allows running multiple tests in parallel // against the same terraform module. exampleFolder := test_structure.CopyTerraformFolderToTemp(t, "../external", ".") terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ TerraformDir: exampleFolder, }) terraform.Init(t, terraformOptions) terraform.Validate(t, terraformOptions) } ================================================ FILE: test/go.mod ================================================ module git.khuedoan.com/ops/homelab go 1.21 toolchain go1.21.4 require github.com/gruntwork-io/terratest v0.46.1 require ( cloud.google.com/go v0.105.0 // indirect cloud.google.com/go/compute v1.12.1 // indirect cloud.google.com/go/compute/metadata v0.2.1 // indirect cloud.google.com/go/iam v0.7.0 // indirect cloud.google.com/go/storage v1.27.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/aws/aws-sdk-go v1.44.122 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/go-sql-driver/mysql v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gruntwork-io/go-commons v0.8.0 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-multierror v1.1.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl/v2 v2.9.1 // indirect github.com/hashicorp/terraform-json v0.13.0 // indirect github.com/imdario/mergo v0.3.11 // indirect github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.15.11 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/otp v1.2.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.8.1 // indirect github.com/tmccombs/hcl2json v0.3.3 // indirect github.com/ulikunitz/xz v0.5.10 // indirect github.com/urfave/cli v1.22.2 // indirect github.com/zclconf/go-cty v1.9.1 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.1.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.103.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c // indirect google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.27.2 // indirect k8s.io/apimachinery v0.27.2 // indirect k8s.io/client-go v0.27.2 // indirect k8s.io/klog/v2 v2.90.1 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) // TODO https://github.com/gruntwork-io/terratest/pull/1182 replace github.com/gruntwork-io/terratest v0.46.1 => github.com/khuedoan/terratest v0.0.0-20231027122225-118d656063b1 ================================================ FILE: test/go.sum ================================================ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= cloud.google.com/go/iam v0.7.0 h1:k4MuwOsS7zGJJ+QfZ5vBK8SgHBAvYN/23BWsiihJ1vs= cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.44.122 h1:p6mw01WBaNpbdP2xrisz5tIkcNwzj/HysobNoaAHjgo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 h1:skJKxRtNmevLqnayafdLe2AsenqRupVmzZSqrvb5caU= github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gruntwork-io/go-commons v0.8.0 h1:k/yypwrPqSeYHevLlEDmvmgQzcyTwrlZGRaxEM6G0ro= github.com/gruntwork-io/go-commons v0.8.0/go.mod h1:gtp0yTtIBExIZp7vyIV9I0XQkVwiQZze678hvDXof78= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl/v2 v2.9.1 h1:eOy4gREY0/ZQHNItlfuEZqtcQbXIxzojlP301hDpnac= github.com/hashicorp/hcl/v2 v2.9.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= github.com/hashicorp/terraform-json v0.13.0 h1:Li9L+lKD1FO5RVFRM1mMMIBDoUHslOniyEi5CM+FWGY= github.com/hashicorp/terraform-json v0.13.0/go.mod h1:y5OdLBCT+rxbwnpxZs9kGL7R9ExU76+cpdY8zHwoazk= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt70eK/BSch+gFAGrNzecsoENgu2o= github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/khuedoan/terratest v0.0.0-20231027122225-118d656063b1 h1:tUqeZ6zdVYNz+VvLtQzxVlDfZocX5ttfQh6M1i7f6FU= github.com/khuedoan/terratest v0.0.0-20231027122225-118d656063b1/go.mod h1:gl//tb5cLnbpQs1FTSNwhsrbhsoG00goCJPfOnyliiU= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 h1:ofNAzWCcyTALn2Zv40+8XitdzCgXY6e9qvXwN9W0YXg= github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/otp v1.2.0 h1:/A3+Jn+cagqayeR3iHs/L62m5ue7710D35zl1zJ1kok= github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.8.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.9.1 h1:viqrgQwFl5UpSxc046qblj78wZXVDFnSOufaOTER+cc= github.com/zclconf/go-cty v1.9.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c h1:S34D59DS2GWOEwWNt4fYmTcFrtlOgukG2k9WsomZ7tg= google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= ================================================ FILE: test/integration_test.go ================================================ package test import ( "crypto/tls" "fmt" "testing" "time" http_helper "github.com/gruntwork-io/terratest/modules/http-helper" "github.com/gruntwork-io/terratest/modules/k8s" ) func TestArgoCDCheck(t *testing.T) { t.Parallel() // Setup the kubectl config and context. Here we choose to use the defaults, which is: // - $KUBECONFIG for the kubectl config file // - Current context of the kubectl config file options := k8s.NewKubectlOptions("", "", "argocd") // This will wait up to 10 seconds for the service to become available, to ensure that we can access it k8s.WaitUntilIngressAvailable(t, options, "argocd-server", 10, 1*time.Second) // Now we verify that the service will successfully boot and start serving requests ingress := k8s.GetIngress(t, options, "argocd-server") // Setup a TLS configuration to submit with the helper, a blank struct is acceptable tlsConfig := tls.Config{} // Test the endpoint for up to 5 minutes. This will only fail if we timeout waiting for the service to return a 200 response http_helper.HttpGetWithRetryWithCustomValidation( t, fmt.Sprintf("https://%s", ingress.Spec.Rules[0].Host), &tlsConfig, 30, 30*time.Second, func(statusCode int, body string) bool { return statusCode == 200 }, ) } ================================================ FILE: test/smoke_test.go ================================================ package test import ( "crypto/tls" "fmt" "os" "testing" "time" http_helper "github.com/gruntwork-io/terratest/modules/http-helper" "github.com/gruntwork-io/terratest/modules/k8s" ) func TestSmoke(t *testing.T) { t.Parallel() var mainApps = []struct { name string namespace string }{ {"argocd-server", "argocd"}, {"gitea", "gitea"}, {"grafana", "grafana"}, {"homepage", "homepage"}, {"kanidm", "kanidm"}, {"zot", "zot"}, } for _, app := range mainApps { app := app // https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables t.Run(app.name, func(t *testing.T) { t.Parallel() options := k8s.NewKubectlOptions("", "", app.namespace) // Wait the service to become available to ensure that we can access it k8s.WaitUntilIngressAvailable(t, options, app.name, 30, 60*time.Second) // Now we verify that the service will successfully boot and start serving requests ingress := k8s.GetIngress(t, options, app.name) // Setup a TLS configuration, ignore the certificate because we may not use cert-manager (like the sandbox environment) tlsConfig := tls.Config{ InsecureSkipVerify: os.Getenv("INSECURE_SKIP_VERIFY") != "", } // Test the endpoint, this will only fail if we timeout waiting for the service to return a 200 response http_helper.HttpGetWithRetryWithCustomValidation( t, fmt.Sprintf("https://%s", ingress.Spec.Rules[0].Host), &tlsConfig, 30, 60*time.Second, func(statusCode int, body string) bool { return statusCode == 200 }, ) }) } } ================================================ FILE: test/tools_test.go ================================================ package test import ( "path/filepath" "testing" "github.com/gruntwork-io/terratest/modules/shell" "github.com/gruntwork-io/terratest/modules/version-checker" ) func TestToolsVersions(t *testing.T) { t.Parallel() var tools = []struct { binaryPath string versionArg string versionConstraint string }{ {"ansible", "--version", ">= 2.12.6, < 3.0.0"}, {"docker", "--version", ">= 25.0.0, < 26.0.0"}, {"git", "--version", ">= 2.37.1, < 3.0.0"}, {"go", "version", ">= 1.22.0, < 1.23.0"}, {"helm", "version", ">= 3.9.4, < 4.0.0"}, {"kubectl", "version", ">= 1.30.0, < 1.32.0"}, // https://kubernetes.io/releases/version-skew-policy/#kubectl {"kustomize", "version", ">= 5.0.3, < 6.0.0"}, {"pre-commit", "--version", ">= 3.3.2, < 4.0.0"}, {"tofu", "--version", ">= 1.7.0, < 1.9.0"}, } for _, tool := range tools { tool := tool // https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables t.Run(tool.binaryPath, func(t *testing.T) { t.Parallel() params := version_checker.CheckVersionParams{ BinaryPath: tool.binaryPath, VersionConstraint: tool.versionConstraint, VersionArg: tool.versionArg, WorkingDir: ".", } version_checker.CheckVersion(t, params) }) } } func TestToolsNixShell(t *testing.T) { t.Parallel() projectRoot, err := filepath.Abs("../") if err != nil { t.FailNow() } command := shell.Command{ Command: "nix", Args: []string{ "develop", "--experimental-features", "nix-command flakes", "--command", "true", }, WorkingDir: projectRoot, } shell.RunCommand(t, command) }