diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 4f97160..acfa158 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -9,7 +9,7 @@ runs: uses: defenseunicorns/setup-zarf@main with: # renovate: datasource=github-tags depName=defenseunicorns/zarf versioning=semver - version: v0.31.1 + version: v0.32.1 download-init-package: true - name: Use Node.js latest @@ -27,4 +27,4 @@ runs: - name: Install UDS CLI shell: bash # renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver - run: brew install defenseunicorns/tap/uds@0.5.2 + run: brew install defenseunicorns/tap/uds@0.6.1 diff --git a/chart/.helmignore b/chart/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/chart/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/chart/Chart.yaml b/chart/Chart.yaml new file mode 100644 index 0000000..3d83d4e --- /dev/null +++ b/chart/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v2 +name: chart +description: uds-sonarqube-config + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 diff --git a/chart/templates/uds-package.yaml b/chart/templates/uds-package.yaml new file mode 100644 index 0000000..d46e8d3 --- /dev/null +++ b/chart/templates/uds-package.yaml @@ -0,0 +1,20 @@ +apiVersion: uds.dev/v1alpha1 +kind: Package +metadata: + name: sonarqube + namespace: {{ .Release.Namespace }} +spec: + network: + expose: + - service: sonarqube-sonarqube + podLabels: + app: sonarqube + gateway: tenant + host: sonarqube + port: 9000 + allow: + # Todo: wide open for hitting in-cluster or external postgres + - direction: Egress + podLabels: + app: sonarqube + remoteGenerated: Anywhere diff --git a/chart/values.yaml b/chart/values.yaml new file mode 100644 index 0000000..e69de29 diff --git a/tasks/create.yaml b/tasks/create.yaml index 7f28155..9f1a735 100644 --- a/tasks/create.yaml +++ b/tasks/create.yaml @@ -1,3 +1,7 @@ +variables: + - name: FLAVOR + default: "registry1" + tasks: - name: sonarqube-test-bundle description: Create the UDS bundle with Sonarqube and its dependencies @@ -9,7 +13,7 @@ tasks: - name: sonarqube-package description: Create the UDS Sonarqube Zarf Package actions: - - cmd: zarf package create --confirm --no-progress --architecture=${ZARF_ARCHITECTURE} --flavor registry1 + - cmd: zarf package create --confirm --no-progress --architecture=${ZARF_ARCHITECTURE} --flavor ${FLAVOR} - name: dependency-package description: Create the Dependency Zarf Package(s) diff --git a/tasks/setup.yaml b/tasks/setup.yaml index 2a02904..a9bb5e4 100644 --- a/tasks/setup.yaml +++ b/tasks/setup.yaml @@ -2,4 +2,4 @@ tasks: - name: k3d-test-cluster actions: - description: Create k3d cluster with UDS Core - cmd: uds deploy oci://defenseunicorns/uds/bundles/k3d-core-istio:0.7.0-${UDS_ARCH} --confirm --no-progress + cmd: uds deploy oci://defenseunicorns/uds/bundles/k3d-core-istio:0.8.0-${UDS_ARCH} --confirm --no-progress diff --git a/values/sonarqube-values.yaml b/values/sonarqube-values.yaml index 3e6b4ee..e674ef3 100644 --- a/values/sonarqube-values.yaml +++ b/values/sonarqube-values.yaml @@ -73,10 +73,5 @@ postgresql: postgresqlDatabase: ###ZARF_VAR_SONARQUBE_DB_NAME### service: port: 5432 - -service: - labels: - uds/istio-gateway: tenant - uds/istio-host: sonarqube domain: ###ZARF_VAR_DOMAIN### diff --git a/zarf.yaml b/zarf.yaml index 1f3a256..046c450 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -54,6 +54,10 @@ components: version: "8.0.3-bb.0" valuesFiles: - values/sonarqube-values.yaml + - name: uds-sonarqube-config + namespace: sonarqube + version: 0.1.0 + localPath: chart images: - "registry1.dso.mil/ironbank/big-bang/base:2.1.0" - "registry1.dso.mil/ironbank/big-bang/sonarqube-9:9.9.3-community" @@ -77,6 +81,10 @@ components: - values/sonarqube-values.yaml - values/upstream.yaml - values/ce.yaml + - name: uds-sonarqube-config + namespace: sonarqube + version: 0.1.0 + localPath: chart images: - "sonarqube:9.9.3-community" - "curlimages/curl:7.76.1"