Skip to content

Commit

Permalink
SONAR-21727 implement mpdev verify tests command
Browse files Browse the repository at this point in the history
NO-JIRA temporary fix missing application crd in test

waiting for datreeio/CRDs-catalog#276 merge

update partner name and partner id

update partner id and fix tests
  • Loading branch information
jCOTINEAU committed Feb 27, 2024
1 parent eff6da1 commit 9d42eb5
Show file tree
Hide file tree
Showing 10 changed files with 780 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cirrus/unit_helm_compatibility_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ echo 'Running unit compatibility tests for Kubernetes version' $KUBE_VERSION
for file in "$STATIC_TEST_FOLDER"/*; do
TEST_CASE_NAME=$(basename "$file")
echo 'Entering test for' $TEST_CASE_NAME
helm template --kube-version $KUBE_VERSION --dry-run --debug -f "$file" $TEST_CASE_NAME . | kubeconform --kubernetes-version $KUBE_VERSION --summary --strict
helm template --kube-version $KUBE_VERSION --dry-run --debug -f "$file" $TEST_CASE_NAME . | kubeconform --kubernetes-version $KUBE_VERSION --summary --strict -schema-location default -schema-location "../../tests/test-crds/app.k8s.io/application_v1beta1.json"
echo 'Ending test for' $TEST_CASE_NAME
done
8 changes: 5 additions & 3 deletions charts/sonarqube-dce/templates/application.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.application .Values.application.create }} # declared in schema.yaml
{{- if .Values.gcp_marketplace }} # declared in google-cloud-marketplace-k8s-app value folder
apiVersion: app.k8s.io/v1beta1
kind: Application
metadata:
Expand All @@ -8,7 +8,7 @@ metadata:
app.kubernetes.io/name: "{{ .Release.Name }}"
annotations:
#to update with partner metadata
marketplace.cloud.google.com/deploy-info: '{"partner_id": "partner", "product_id": "sonarqube-dce", "partner_name": "Partner"}'
marketplace.cloud.google.com/deploy-info: '{"partner_id": "sonarsource-public", "product_id": "official-sonarqube-data-center-edition", "partner_name": "SonarSource SA"}'
kubernetes-engine.cloud.google.com/icon: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUsA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t19NnO7FHALCEkiNVkfiaDzlyrZVCEsgNXnOcHoLCEsgMa+/3bSVpdM58Vw0leUKhCWQIpo83hGWQIq0OhQHNHlWIyyBBDUZTr91KuuCSwhLIEUzce6I5xlNnqsQlkCC5k0eJ7z4eDXCEkiVcqwuFR3xqxCWQKKUdgtLrdmzvAphCaTK8SQPHfGrEZZAonLJfxdHdMQvIyyBRN0a0RH3ibAEEjV/HtcJHfHLCEsgYa53W2qt2bO8gLAEEqYdO+KmyUNleQFhCSRNHYsLRYPnIsISSJjSzk/jrjE+dB5hCSSsyfhQNvvsT4JPCEsgYU3Gh7Jsyr7lEsISSNg/HW9Mt3ROR3wZYQkk7ODBpg1Lp8BUNHnOISyB1LnPWq4LPiEsgdQ5dsRNZckyfAlhCSROue5bclXbOYQlkDjtOJiuqSzPISyBxCnHWUt7r6XgE8ISwEqc4jlDWAKJ07nzkUdO8SwhLIHEjcfuYTnKpuuCAmEJYCUtNHkWCEsgcU1uTOfI4xnCEgAqICyBAXB9XoLz4WcISwCogLAEBkC7X9XGnuUcYQkMg1NY8srjGcISACogLIEBaPBwGeYISwArcaflGcISwGqasFwgLAGgAsISACogLAGgAsISACoYC4DknWb6STb77KkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBm/gWaoBF4PALBSQAAAABJRU5ErkJggg==
spec:
descriptor:
Expand All @@ -34,7 +34,9 @@ spec:
For extended documentation on how to configure this app, please refer to the [official SonarQube helm chart documentation](https://artifacthub.io/packages/helm/sonarqube/sonarqube-dce) and the main [README](https://github.com/SonarSource/helm-chart-sonarqube/blob/master/README.md)
selector:
matchLabels:
app.kubernetes.io/name: "{{ .Release.Name }}"
# we should use app.kubernetes.io/name, which should be set by default to all pods, but this is not working.
# so we rely on our own custom release field
release: "{{ .Release.Name }}"
addOwnerRef: true
componentKinds:
- group: v1
Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube-dce/templates/tests/sonarqube-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
'--waitretry=1',
'--timeout=5',
'-t',
'12',
'1200',
'-qO-',
'{{ template "sonarqube.fullname" . }}:{{ .Values.service.internalPort }}/api/system/status'
]
Expand Down
14 changes: 14 additions & 0 deletions google-cloud-marketplace-k8s-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ARG FROM=gcr.io/cloud-marketplace-tools/k8s/deployer_helm:latest
FROM $FROM

ENV WAIT_FOR_READY_TIMEOUT 1200
ENV TESTER_TIMEOUT 1200

COPY charts/sonarqube-dce /tmp/chart.tmp/sonarqube-dce
RUN cd /tmp \
&& mv chart.tmp/* chart \
Expand All @@ -11,9 +14,20 @@ RUN cd /tmp \

COPY google-cloud-marketplace-k8s-app/schema.yaml /data/schema.yaml
# Provide registry prefix and tag for default values for images.
# Might not be needed on V2 schema
ARG REGISTRY
ARG TAG
RUN cat /data/schema.yaml \
| env -i "REGISTRY=$REGISTRY" "TAG=$TAG" envsubst \
> /data/schema.yaml.new \
&& mv /data/schema.yaml.new /data/schema.yaml

COPY google-cloud-marketplace-k8s-app/data-test/schema.yaml /data-test/schema.yaml
# Provide registry prefix and tag for default values for images.
# Might not be needed on V2 schema
ARG REGISTRY
ARG TAG
RUN cat /data-test/schema.yaml \
| env -i "REGISTRY=$REGISTRY" "TAG=$TAG" envsubst \
> /data-test/schema.yaml.new \
&& mv /data-test/schema.yaml.new /data-test/schema.yaml
1 change: 1 addition & 0 deletions google-cloud-marketplace-k8s-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export VERSION=10.4.0
export MINOR_VERSION=$(echo $VERSION | cut -d. -f1,2)
# Deployer does not care about patch version. see [here](https://github.com/GoogleCloudPlatform/marketplace-k8s-app-tools/blob/master/docs/building-deployer-helm.md#images-in-staging-gcr)
docker build -f google-cloud-marketplace-k8s-app/Dockerfile --tag $REGISTRY/$APP_NAME/deployer:$MINOR_VERSION .
docker push $REGISTRY/$APP_NAME/deployer:$MINOR_VERSION
```

With the deployer being built, one can deploy the app as is, with
Expand Down
78 changes: 78 additions & 0 deletions google-cloud-marketplace-k8s-app/data-test/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
x-google-marketplace:
clusterConstraints:
istio:
type: UNSUPPORTED
schemaVersion: v2
applicationApiVersion: v1beta1
publishedVersion: '10.4.0'
publishedVersionMetadata:
releaseNote: >-
A first release.
images:
'':
properties:
ApplicationNodes.image.repository:
type: REPO_WITH_REGISTRY
ApplicationNodes.image.tag:
type: TAG
sonarqube-dce-search:
properties:
searchNodes.image.repository:
type: REPO_WITH_REGISTRY
searchNodes.image.tag:
type: TAG

properties:
name:
type: string
x-google-marketplace:
type: NAME
namespace:
type: string
x-google-marketplace:
type: NAMESPACE
appUid:
type: string
x-google-marketplace:
type: APPLICATION_UID
applicationUid:
generatedProperties:
createApplicationBoolean: application.create
ApplicationNodes.jwtSecret:
title: JWT Token for app authentication
description: A HS256 key encoded with base64 (This value must be set before installing the app, see documentation for more details)
maxLength: 44
type: string
default: dZ0EB0KxnF++nr5+4vfTCaun/eWbv6gOoXodiAMqcFo=
x-google-marketplace:
type: MASKED_FIELD
postgresql.enabled:
title: Enable embedeed PostgreSQL
description: If true, PostgreSQL will be installed (not recommended for production use case)
type: boolean
default: true
jdbcOverwrite.enable:
title: Enable external DB configuration
description: If true, the JDBC URL, username and password will be used to connect to the database. Make sure enable embedeed PostgreSQL is set to false
type: boolean
default: false
jdbcOverwrite.jdbcUrl:
title: JDBC URL
description: The JDBC URL to connect to the database
type: string
default: ''
jdbcOverwrite.jdbcUsername:
title: JDBC Username
description: The username to connect to the database
type: string
default: ''
jdbcOverwrite.jdbcPassword:
title: JDBC Password
description: The password to connect to the database
type: string
default: ''

required:
- name
- namespace
- ApplicationNodes.jwtSecret
8 changes: 7 additions & 1 deletion google-cloud-marketplace-k8s-app/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ properties:
description: The password to connect to the database
type: string
default: ''

gcp_marketplace:
title: GCP Marketplace enabled
description: this flag indicate to the chart that it runs as a gcp marketplace application
type: string
default: 'true'
enum:
- 'true'
required:
- name
- namespace
Expand Down
158 changes: 158 additions & 0 deletions tests/test-crds/app.k8s.io/application_v1alpha1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"description": "Application is the Schema for the applications API",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "ApplicationSpec defines the specification for an Application.",
"properties": {
"assemblyPhase": {
"type": "string"
},
"componentKinds": {
"description": "ComponentGroupKinds is a list of Kinds for Application's components (e.g. Deployments, Pods, Services, CRDs). It can be used in conjunction with the Application's Selector to list or watch the Applications components.",
"items": {
"description": "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types",
"properties": {
"group": {
"type": "string"
},
"kind": {
"type": "string"
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"description": {
"type": "string"
},
"info": {
"description": "Info contains human readable key,value pairs for the Application.",
"items": {
"description": "InfoItem is a human readable key,value pair containing important information about how to access the Application.",
"properties": {
"name": {
"description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"keywords": {
"items": {
"type": "string"
},
"type": "array"
},
"links": {
"items": {
"properties": {
"description": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"maintainers": {
"items": {
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"notes": {
"type": "string"
},
"owners": {
"items": {
"type": "string"
},
"type": "array"
},
"selector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"matchLabels": {
"type": "object"
}
},
"type": "object",
"additionalProperties": false
},
"type": {
"type": "string"
},
"version": {
"type": "string"
}
},
"type": "object",
"additionalProperties": false
},
"status": {
"properties": {
"observedGeneration": {
"type": "integer"
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object"
}
Loading

0 comments on commit 9d42eb5

Please sign in to comment.