diff --git a/.editorconfig b/.editorconfig index d6c8e7d3b9..316e7aee92 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,8 +10,9 @@ trim_trailing_whitespace = true max_line_length = 120 tab_width = 4 +[{Makefile,go.mod,go.sum,*.go,.gitmodules}] +indent_style = tab +indent_size = 4 + [*.md] trim_trailing_whitespace = false - -[Makefile] -indent_style = tab diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 46a309c009..17d40ca5be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,10 +9,10 @@ stages: only: - master - merge_requests - - tags + - tags compile: - only: + only: - branches - merge_requests - tags @@ -42,7 +42,7 @@ package: - echo "PACKAGE_JOB_ID=$CI_JOB_ID" >> job.env artifacts: reports: - dotenv: job.env + dotenv: job.env paths: - build/ @@ -54,7 +54,7 @@ e2e: artifacts: true tags: - bigbang - - packages + - packages before_script: - yum install openssh-clients -y - eval $(ssh-agent -s) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..deb3b60e3d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,34 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: detect-aws-credentials + args: + - "--allow-missing-credentials" + - id: detect-private-key + exclude: "^examples/big-bang/template/bigbang/values.yaml$" + - id: end-of-file-fixer + - id: fix-byte-order-marker + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - repo: https://github.com/sirosen/fix-smartquotes + rev: 0.2.0 + hooks: + - id: fix-smartquotes + - repo: https://github.com/dnephin/pre-commit-golang + rev: v0.4.0 + hooks: + - id: go-fmt +# Commenting this one out for now since it fails +## Normally we wouldn't need to do a local hook but we need to modify the shell script that gets run to first change directories into the `cli` folder +# - repo: local +# hooks: +# - id: golangci-lint +# name: golangci-lint +# entry: hooks/run-golangci-lint.sh +# types: [ go ] +# language: script +# pass_filenames: false +# description: "Runs `golangci-lint`, requires https://github.com/golangci/golangci-lint" diff --git a/.vscode/launch.json b/.vscode/launch.json index 1fcd1d8055..6908e48e57 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -19,4 +19,4 @@ }, ] -} \ No newline at end of file +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 771ccf0b02..ef2993feee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,6 +38,19 @@ Here's what a typical "day in the life" of a Zarf developer might look like. Kee This section dives deeper into how we test Zarf +### Pre-Commit Hooks and Linting + +In this repo we use [pre-commit](https://pre-commit.com/) hooks for automated validation and linting. The CI pipeline will validate that all of the hooks pass so we strongly recommend that you install the hooks locally or you'll be spending a lot of time manually fixing issues that could be fixed automatically very quickly. + +#### Pre-Commit Prerequisites + +1. Install [pre-commit](https://pre-commit.com/) +1. Install [go](https://golang.org/) +1. Install [golangci-lint](https://github.com/golangci/golangci-lint) +1. Run `pre-commit install` in the repo to install the pre-commit hooks. This will make the hooks run automatically each time you `git commit`. If you want to skip the hooks for any reason you can run `git commit --no-verify` to skip them. + +> **HINT:** *Consider [automatically enabling the hooks in every Git repository](https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories)* + ### End2End Testing Our E2E tests utilize [Terratest](https://terratest.gruntwork.io/). They create real infrastructure in AWS that the tests get run on. By doing this we are able to make the test environments ephemeral and allow them to be run in parallel so that we can do more testing more quickly. @@ -50,4 +63,4 @@ We're still working on building out the test suite. If you want to help check ou - [#99](https://github.com/defenseunicorns/zarf/issues/99): Writing additional tests - [#100](https://github.com/defenseunicorns/zarf/issues/100): Each test should be runnable locally - [#101](https://github.com/defenseunicorns/zarf/issues/101): Run E2E tests on multiple distros -- [#102](https://github.com/defenseunicorns/zarf/issues/102): Make the E2E tests more efficient \ No newline at end of file +- [#102](https://github.com/defenseunicorns/zarf/issues/102): Make the E2E tests more efficient diff --git a/README.md b/README.md index 097160ef1e..adba720df9 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,12 @@ General usage steps below. For various ways to use Zarf, see [the examples fold [![asciicast](https://asciinema.org/a/427846.svg)](https://asciinema.org/a/427846) ### 2. Create the zarf cluster -- Move the `zarf`, `zarf-init.tar.zst` files to the system you will install the cluster to. +- Move the `zarf`, `zarf-init.tar.zst` files to the system you will install the cluster to. - Login or sudo/su to root. - Run `./zarf init` and follow the wizard. [![asciicast](https://asciinema.org/a/427721.svg)](https://asciinema.org/a/427721) -### 3. Add resources to the zarf cluster +### 3. Add resources to the zarf cluster - Following step 1b, make any necessary edits to the `zarf.yaml` file. - Then run `./zarf package create` to produce an `zarf-package-*.tar.zst` package. - Move the `zarf-package` into the same folder on the running zarf cluster as in step 2a. @@ -43,10 +43,10 @@ This tool utilizes software pulled from multiple sources and _some_ of them requ - [Iron Bank](https://registry1.dso.mil/) : Platform One's authorized, hardened, and approved container repository. ([product](https://p1.dso.mil/#/products/iron-bank/) | [pages](https://ironbank.dso.mil/) | [register](https://login.dso.mil/register)) #### Local Environment -- MacOS or Linux Operating System +- MacOS or Linux Operating System - [`make`](https://www.gnu.org/software/make/) : We use Makefiles for build automation - [`vagrant`](https://www.vagrantup.com/) : Easy creation and management of clean dev/test environments -- [`go`](https://golang.org/) : The programming language. Right now we are using v1.16.x +- [`go`](https://golang.org/) : The programming language. Right now we are using v1.16.x --- @@ -103,7 +103,7 @@ All OS options: - centos7 - centos8 - ubuntu -- debian +- debian - rocky In less than a minute, you'll have a kubernetes cluster running all the pre-requisites needed to host and deploy multiple other downstream clusters. diff --git a/assets/manifests/common/traefik-tls.yaml b/assets/manifests/common/traefik-tls.yaml index bc953156d9..513e40405a 100644 --- a/assets/manifests/common/traefik-tls.yaml +++ b/assets/manifests/common/traefik-tls.yaml @@ -16,4 +16,4 @@ spec: redirectRegex: regex: ^http://(.*) replacement: https://${1} - permanent: true \ No newline at end of file + permanent: true diff --git a/assets/manifests/logging/pgl-stack.yaml b/assets/manifests/logging/pgl-stack.yaml index 65d76b2781..82409d7ad3 100644 --- a/assets/manifests/logging/pgl-stack.yaml +++ b/assets/manifests/logging/pgl-stack.yaml @@ -63,6 +63,6 @@ spec: extraVolumeMounts: - name: journal mountPath: /var/log/journal - readOnly: true + readOnly: true image: pullPolicy: Never diff --git a/assets/misc/k9s-theme.yaml b/assets/misc/k9s-theme.yaml index 273034207b..c8fa1c1104 100644 --- a/assets/misc/k9s-theme.yaml +++ b/assets/misc/k9s-theme.yaml @@ -108,4 +108,4 @@ k9s: bgColor: *background indicator: fgColor: *foreground - bgColor: *purple \ No newline at end of file + bgColor: *purple diff --git a/assets/scripts/k3s-remove.sh b/assets/scripts/k3s-remove.sh index 305bb443b8..175d56f86b 100644 --- a/assets/scripts/k3s-remove.sh +++ b/assets/scripts/k3s-remove.sh @@ -96,4 +96,4 @@ rm -f /usr/local/bin/k9s rm -f /usr/local/bin/k3s-remove.sh rm -fr zarf-pki -echo -e '\033[0m' \ No newline at end of file +echo -e '\033[0m' diff --git a/assets/scripts/k3s.service b/assets/scripts/k3s.service index 5747ec042b..a27ba9da0f 100644 --- a/assets/scripts/k3s.service +++ b/assets/scripts/k3s.service @@ -24,4 +24,4 @@ RestartSec=5s ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service' ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe overlay -ExecStart=/usr/local/bin/k3s server --write-kubeconfig-mode=700 \ No newline at end of file +ExecStart=/usr/local/bin/k3s server --write-kubeconfig-mode=700 diff --git a/cli/.gitignore b/cli/.gitignore index fe21c0d854..3e8e1c62be 100644 --- a/cli/.gitignore +++ b/cli/.gitignore @@ -7,4 +7,4 @@ build .env .image-cache/ .DS_Store -bundle/ \ No newline at end of file +bundle/ diff --git a/cli/.gitlab-ci.yml b/cli/.gitlab-ci.yml index fd5932e40c..786b2794ac 100644 --- a/cli/.gitlab-ci.yml +++ b/cli/.gitlab-ci.yml @@ -37,4 +37,3 @@ release-from-tag: - echo "Creating a release for $CI_COMMIT_TAG" - release-cli create --name "Zarf CLI ${CI_COMMIT_TAG}" --tag-name "${CI_COMMIT_TAG}" --description "CLI for Zarf" --assets-link "{\"name\":\"zarf\",\"url\":\"https://repo1.dso.mil/platform-one/big-bang/apps/product-tools/zarf/cli/-/jobs/${JOB_ID}/artifacts/raw/zarf\"}" - \ No newline at end of file diff --git a/cli/cmd/logo.go b/cli/cmd/logo.go index 7610a177aa..94897db6a8 100644 --- a/cli/cmd/logo.go +++ b/cli/cmd/logo.go @@ -4,52 +4,52 @@ package cmd func getLogo() string { var logo = ` -         *,                                                                               -         *(((&&&&&/*.                                                                     -          *(((((%&&&&&&&*,                                                                -           *(((((((&&&&&&&&&*              ,,*****,.                      **%&&&&&((((((  -            *(((((((((&&&&&&&@*    **@@@@@@&&&&&&&&&&@@@@@**         */&&&&&&((((((((((   -              *((((((///(&&&&&&@@@@&&&&@@@@@@@@@&&&&&&&&&&&&&&@/* *%&&&&&&/////((((((*    -                *(((///////&&&&&&&&&&&&&@@@@@@@@@&&&&&&&&&&&&&&&&&(%&&&/**///////(/*      -       */&&&&&&&&&&&&&&&&*/***&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&/*******///*          +         *,                                                                               +         *(((&&&&&/*.                                                                     +          *(((((%&&&&&&&*,                                                                +           *(((((((&&&&&&&&&*              ,,*****,.                      **%&&&&&((((((  +            *(((((((((&&&&&&&@*    **@@@@@@&&&&&&&&&&@@@@@**         */&&&&&&((((((((((   +              *((((((///(&&&&&&@@@@&&&&@@@@@@@@@&&&&&&&&&&&&&&@/* *%&&&&&&/////((((((*    +                *(((///////&&&&&&&&&&&&&@@@@@@@@@&&&&&&&&&&&&&&&&&(%&&&/**///////(/*      +       */&&&&&&&&&&&&&&&&*/***&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&/*******///*             *&%&&&&&&&&&&&&&&&&&&&&&&&***&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&****/&&&&&&&&&&&&(/* - */((((((((((((((///////******%%&&&&&&&&//&@@*&&&&&&&&&&&&&&&&&&&#%&&&&*/####(/////((((/. -     */((((((((((///////******%%%%%%%%%(##@@@//%&%%%%%%%&%&%%&&/(@@(/&&(***///////(((*    -          ***(((((/////********%%%%%%%/&%***/((%%%%%%%%%%%%%%%%(#&@*%/%%***/////**        -            *&&%%%%%%//*******%%%%%%%%@@****%%/%%%%%%%%%%%%%%%%%%***@@%%**(%%%&&*         -          *&&%%%%%(////******/(%%%%%%%@@@**@@&%%%%%%%%%%%%%%%%%(@@*%@@%%*****////%&*      -        *&%%%%%#////////***/////%%%%%%*@@@@@/%%%%%%%%%%%%%%%%%%%%@@@@%%*****///////((*    -       *%%%%((((///////*    *////(%%%%%%##%%%%%%%%%%%(%%%%*%%%%%%%%%%%*                   -      *(((((((/***            */////#%%%%%%%%%%#%%%%%%%%%%%%%%%%%%%%#*                    -                   %%(           ,*///((%%%%%%%%(**/#%%%##**/%%%%%*                       -                 %%%&&&&           *///*/(((((########//######**                          -                 %&&&&&*          *#######(((((((//////((((*                              -                                  ###%##############(((#####*                             -                   %@&&          *&#(%######*#########(#####/                             -                   /&&* ..       ,&#(/%####(*#########/#####/             #%@%&&&         -             **         &&     ./%##((*&####/(#######(#####*(*            %&&&&&&         -           *@%%@*             *&#####((((####*(#####(*###(*(##*              ,  %@&       -          *@%%%%*            *%######((((*%####/*((*%####/*(###*  *                       -         *@%%%%%%*      *##* **#(###((((///#*#*(((((/#**#((*(##**#,*/##*,    %@&&         -         *@%%%*%%%*  ****,*##/*#*##(((((((/(((((((((/(((*(((((###########*,  #&&#         -         *@%%%*(%%%/*   **######(#((..((((((((((((((((((*  ,*(#####(((((*,                -         *@%%%#(*%%%%*   ,**/####(* */(((((((((((((((((*     ,**,                         -          *@%%%*(/(%%%%/*     ******(((((((((((*(((((*                                    -           *@%%%#(((*/%%%%%%##%%*((((((((((((**((((*                                      -            *@%%%%*(((((((((((((((((((((((*/%*((*.             (&&&(                      -             ,*%%%%%%*((((((((((((((((**%%%**,                (&                          -                *%%%%%%%%%(/*****(#%%%%%**                      &%                        -                   ,**%%%%%%%%%%%%%***                                                    -                                                                                          -             ,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((,           -                         .....(((((((/////////////////((((((((.....                       -                                                                                          -            ///////////////      ///////      *****************  ***************,         -                    ////.       ///  ////     *///          ***  ****                     -                 ////,         ///    ////    *///////////////.  /////**/******           -              /////          //////////////   *///      *///     ///*                     -           ./////////////// ////         ///  *///        ////   ///*                     -                                                                                          + */((((((((((((((///////******%%&&&&&&&&//&@@*&&&&&&&&&&&&&&&&&&&#%&&&&*/####(/////((((/. +     */((((((((((///////******%%%%%%%%%(##@@@//%&%%%%%%%&%&%%&&/(@@(/&&(***///////(((*    +          ***(((((/////********%%%%%%%/&%***/((%%%%%%%%%%%%%%%%(#&@*%/%%***/////**        +            *&&%%%%%%//*******%%%%%%%%@@****%%/%%%%%%%%%%%%%%%%%%***@@%%**(%%%&&*         +          *&&%%%%%(////******/(%%%%%%%@@@**@@&%%%%%%%%%%%%%%%%%(@@*%@@%%*****////%&*      +        *&%%%%%#////////***/////%%%%%%*@@@@@/%%%%%%%%%%%%%%%%%%%%@@@@%%*****///////((*    +       *%%%%((((///////*    *////(%%%%%%##%%%%%%%%%%%(%%%%*%%%%%%%%%%%*                   +      *(((((((/***            */////#%%%%%%%%%%#%%%%%%%%%%%%%%%%%%%%#*                    +                   %%(           ,*///((%%%%%%%%(**/#%%%##**/%%%%%*                       +                 %%%&&&&           *///*/(((((########//######**                          +                 %&&&&&*          *#######(((((((//////((((*                              +                                  ###%##############(((#####*                             +                   %@&&          *&#(%######*#########(#####/                             +                   /&&* ..       ,&#(/%####(*#########/#####/             #%@%&&&         +             **         &&     ./%##((*&####/(#######(#####*(*            %&&&&&&         +           *@%%@*             *&#####((((####*(#####(*###(*(##*              ,  %@&       +          *@%%%%*            *%######((((*%####/*((*%####/*(###*  *                       +         *@%%%%%%*      *##* **#(###((((///#*#*(((((/#**#((*(##**#,*/##*,    %@&&         +         *@%%%*%%%*  ****,*##/*#*##(((((((/(((((((((/(((*(((((###########*,  #&&#         +         *@%%%*(%%%/*   **######(#((..((((((((((((((((((*  ,*(#####(((((*,                +         *@%%%#(*%%%%*   ,**/####(* */(((((((((((((((((*     ,**,                         +          *@%%%*(/(%%%%/*     ******(((((((((((*(((((*                                    +           *@%%%#(((*/%%%%%%##%%*((((((((((((**((((*                                      +            *@%%%%*(((((((((((((((((((((((*/%*((*.             (&&&(                      +             ,*%%%%%%*((((((((((((((((**%%%**,                (&                          +                *%%%%%%%%%(/*****(#%%%%%**                      &%                        +                   ,**%%%%%%%%%%%%%***                                                    +                                                                                          +             ,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((,           +                         .....(((((((/////////////////((((((((.....                       +                                                                                          +            ///////////////      ///////      *****************  ***************,         +                    ////.       ///  ////     *///          ***  ****                     +                 ////,         ///    ////    *///////////////.  /////**/******           +              /////          //////////////   *///      *///     ///*                     +           ./////////////// ////         ///  *///        ////   ///*                     +                                                                                           ` return logo diff --git a/cli/config/config.go b/cli/config/config.go index 132a985fa4..8d0f30ac3b 100644 --- a/cli/config/config.go +++ b/cli/config/config.go @@ -91,4 +91,4 @@ func WriteConfig(path string) { if err != nil { logContext.Fatal("Unable to write the config file") } -} \ No newline at end of file +} diff --git a/e2e.sh b/e2e.sh index eff7d3e50a..b64d24eea0 100755 --- a/e2e.sh +++ b/e2e.sh @@ -43,7 +43,7 @@ beforeAll() { # Download the job artifacts _run "curl -fL https://repo1.dso.mil/platform-one/big-bang/apps/product-tools/zarf/-/jobs/${PACKAGE_JOB_ID}/artifacts/download -o artifact.zip && unzip -jo artifact.zip" - + # List the downloaded files _run "ls -lah" @@ -68,7 +68,7 @@ afterAll() { } loadZarfCA() { - # Get the ca file for curl to trust + # Get the ca file for curl to trust _run "sudo cat zarf-pki/zarf-ca.crt" > zarf-ca.crt } @@ -80,7 +80,7 @@ testPrepareCommands() { if [ $EXPECTED_SHASUM != $ZARF_SHASUM ]; then echo -e "${RED}zarf prepare sha256sum failed for local file${NOCOLOR}" exit 1 - fi + fi # Validate working SHASUM for remote asset EXPECTED_SHASUM="c3cdea0573ba5a058ec090b5d2683bf398e8b1614c37ec81136ed03b78167617" ZARF_SHASUM=$(_run "zarf prepare sha256sum https://zarf-public.s3-us-gov-west-1.amazonaws.com/pipelines/zarf-prepare-shasum-remote-test-file.txt") @@ -137,7 +137,7 @@ beforeAll testPrepareCommands -# Get the admin credentials +# Get the admin credentials ZARF_PWD=$(_run "sudo zarf tools get-admin-password") # Test that k9s is happy @@ -162,4 +162,4 @@ testDataInjection testGitBasedHelmChart # Perform final cleanup -afterAll \ No newline at end of file +afterAll diff --git a/examples/.gitignore b/examples/.gitignore index 1ca6d28d14..b7beff54c5 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1 +1 @@ -sync/ \ No newline at end of file +sync/ diff --git a/examples/appliance/manifests/podinfo.yaml b/examples/appliance/manifests/podinfo.yaml index 713332cd0e..3e9e70f724 100644 --- a/examples/appliance/manifests/podinfo.yaml +++ b/examples/appliance/manifests/podinfo.yaml @@ -24,4 +24,3 @@ spec: name: podinfo port: number: 9898 - diff --git a/examples/game/README.md b/examples/game/README.md index 0f611dd6fd..3c2e4a1b7f 100644 --- a/examples/game/README.md +++ b/examples/game/README.md @@ -1,6 +1,6 @@ ## Zarf Game Mode Example -This example demonstrates using Zarf to kill time (and evil). In this mode there is no gitops service and Zarf is simply a standard means of wrapping airgap concerns for K3s. Game mode is identical to [Appliance Mode](../appliance/README.md), but more fun. +This example demonstrates using Zarf to kill time (and evil). In this mode there is no gitops service and Zarf is simply a standard means of wrapping airgap concerns for K3s. Game mode is identical to [Appliance Mode](../appliance/README.md), but more fun. ### Steps to use: 1. Create a Zarf cluster as outlined in the main [README](../../README.md#2-create-the-zarf-cluster) diff --git a/examples/game/image/index.html b/examples/game/image/index.html index 5d0f4de51c..4040696d61 100644 --- a/examples/game/image/index.html +++ b/examples/game/image/index.html @@ -1,7 +1,7 @@ @@ -20,4 +20,4 @@ }); - \ No newline at end of file + diff --git a/examples/postgres-operator/manifests/minio-operator.yaml b/examples/postgres-operator/manifests/minio-operator.yaml index e8e39d4f77..2958091083 100644 --- a/examples/postgres-operator/manifests/minio-operator.yaml +++ b/examples/postgres-operator/manifests/minio-operator.yaml @@ -20,4 +20,3 @@ spec: limits: cpu: 200m memory: 256Mi - diff --git a/examples/single-big-bang-package/manifests/twistlock.yaml b/examples/single-big-bang-package/manifests/twistlock.yaml index 3a62a1695a..63c06ea78e 100644 --- a/examples/single-big-bang-package/manifests/twistlock.yaml +++ b/examples/single-big-bang-package/manifests/twistlock.yaml @@ -31,4 +31,4 @@ spec: service: name: twistlock-console port: - number: 8081 \ No newline at end of file + number: 8081 diff --git a/examples/single-big-bang-package/zarf.yaml b/examples/single-big-bang-package/zarf.yaml index e6f5a69912..172b416278 100644 --- a/examples/single-big-bang-package/zarf.yaml +++ b/examples/single-big-bang-package/zarf.yaml @@ -16,4 +16,4 @@ components: # https://umbrella-bigbang-releases.s3-us-gov-west-1.amazonaws.com/umbrella/1.14.0/images.txt images: - registry1.dso.mil/ironbank/twistlock/defender/defender:20.12.531 - - registry1.dso.mil/ironbank/twistlock/console/console:21.04.412 \ No newline at end of file + - registry1.dso.mil/ironbank/twistlock/console/console:21.04.412 diff --git a/examples/tiny-kafka/README.md b/examples/tiny-kafka/README.md index a9cb8362db..e112b14aab 100644 --- a/examples/tiny-kafka/README.md +++ b/examples/tiny-kafka/README.md @@ -13,4 +13,4 @@ Testing will require JDK and the kafka tools: `sudo apt install openjdk-14-jdk- 1. Install JDK and extract the Kafka tools from the package `/opt/kafka.tgz` 2. Get the Nodeport: `NODEPORT=$(kubectl get service demo-kafka-external-bootstrap -n kafka-demo -o=jsonpath='{.spec.ports[0].nodePort}{"\n"}')` 3. For pub: `./bin/kafka-console-producer.sh --broker-list localhost:$NODEPORT --topic cool-topic` -4. For sub: `./bin/kafka-console-consumer.sh --bootstrap-server localhost:$NODEPORT --topic cool-topic` \ No newline at end of file +4. For sub: `./bin/kafka-console-consumer.sh --bootstrap-server localhost:$NODEPORT --topic cool-topic` diff --git a/examples/tiny-kafka/manifests/kafka-topic.yaml b/examples/tiny-kafka/manifests/kafka-topic.yaml index 817bb09ece..bf33db8797 100644 --- a/examples/tiny-kafka/manifests/kafka-topic.yaml +++ b/examples/tiny-kafka/manifests/kafka-topic.yaml @@ -7,4 +7,4 @@ metadata: strimzi.io/cluster: "demo" spec: partitions: 3 - replicas: 1 \ No newline at end of file + replicas: 1 diff --git a/examples/tiny-kafka/manifests/kafka.yaml b/examples/tiny-kafka/manifests/kafka.yaml index 91c46d37ee..6f8d27a971 100644 --- a/examples/tiny-kafka/manifests/kafka.yaml +++ b/examples/tiny-kafka/manifests/kafka.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: name: kafka-demo ---- +--- apiVersion: kafka.strimzi.io/v1beta2 kind: Kafka metadata: diff --git a/examples/tiny-kafka/manifests/operator.yaml b/examples/tiny-kafka/manifests/operator.yaml index 8402c88ed7..304a331dcd 100644 --- a/examples/tiny-kafka/manifests/operator.yaml +++ b/examples/tiny-kafka/manifests/operator.yaml @@ -14,5 +14,5 @@ spec: valuesContent: |- imageRegistryOverride: registry1.dso.mil imageRepositoryOverride: ironbank/opensource/strimzi - watchNamespaces: - - kafka-demo \ No newline at end of file + watchNamespaces: + - kafka-demo diff --git a/hooks/run-golangci-lint.sh b/hooks/run-golangci-lint.sh new file mode 100755 index 0000000000..b7b9e8361c --- /dev/null +++ b/hooks/run-golangci-lint.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +cd cli && golangci-lint run "$@"