Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
441c97d
Add CLI instructions as required by the Marketplace
maelvls Feb 16, 2021
b591046
Helm: default to 1.1.0-gcm.1 and the marketplace repo
maelvls Feb 17, 2021
8f89050
Readme: fill in the description
maelvls Feb 17, 2021
412f629
Readme: add a "download license" step
maelvls Feb 17, 2021
f643fa9
Readme: moved the "testing deployer" doc to docs/TESTING-DEPLOYER.md
maelvls Feb 17, 2021
bf5eff5
Docs: mention that the deployer image is ONLY used by the UI
maelvls Feb 17, 2021
752daef
Signed-off-by: Maël Valais <[email protected]>
maelvls Feb 17, 2021
2f87395
PR comments: remove confusing 1.1, 1.1.0, 1.1.0-gcm.1
maelvls Feb 17, 2021
9380b22
PR comment: kubectl apply should not have --namespace
maelvls Feb 17, 2021
fd89c99
PR comment: remove the often-changing subordinate creation
maelvls Feb 17, 2021
4a95d03
Re-enable the preflight deployment
maelvls Feb 17, 2021
5f35f4e
Add a note about why we set preflight.replicaCount to 0
maelvls Feb 17, 2021
b83bdb7
Rename repo from jsp-gcm to jetstack-secure-gcm
maelvls Feb 17, 2021
c5a4c9f
Increase the deployer wait timeout in logs-deployer and logs-smoketest
wallrj Feb 17, 2021
333ba6d
Use default namespace "jetstack-secure"
maelvls Feb 17, 2021
65b645b
Helm: resources were wrongly created in "default"
maelvls Feb 17, 2021
2f2bb4d
Fix the smoke-test-pod name in log-smoke-test job
wallrj Feb 17, 2021
cb46696
Wait for 2m for the test Certificate to be ready
wallrj Feb 17, 2021
3529f27
Use app.kubernetes.io/instance for the application
maelvls Feb 17, 2021
212bbbb
Add the optional step "Set up Jetstack Secure agent"
maelvls Feb 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ RUN cd /tmp/data-test \
&& tar -czvf /tmp/data-test/chart.tar.gz chart \
&& mv chart.tar.gz /data-test/chart/


# If you wonder what magic is this, take a look at:
# https://github.com/GoogleCloudPlatform/marketplace-k8s-app-tools/blob/4335f9/marketplace/deployer_helm_base/onbuild/Dockerfile#L16-L20
562 changes: 304 additions & 258 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "google-cas-issuer.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "google-cas-issuer.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "google-cas-issuer.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "google-cas-issuer.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ if not "disabled-for-now-due-to-missing-configmap" }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "preflight.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "preflight.labels" . | nindent 4 }}
spec:
Expand Down Expand Up @@ -48,4 +48,3 @@ spec:
readOnly: true
resources:
{{- toYaml .Values.resources | nindent 10 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "preflight.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "preflight.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
2 changes: 1 addition & 1 deletion chart/jetstacksecure-mp/charts/preflight/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ image:

serviceAccount:
create: false
name: agent
# name: ""
annotations: {}

rbac:
Expand Down
6 changes: 5 additions & 1 deletion chart/jetstacksecure-mp/templates/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ spec:
descriptor:
type: Jetstack Secure Platform
version: "1.1.0-gcm.1" # Must be the same as in the schema.yaml file.
icons:
- src: https://platform.jetstack.io/logo_icon.png
size: 458x500
type: image/png
selector:
matchLabels:
app.kubernetes.io/name: "{{ .Release.Name }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
addOwnerRef: true
componentKinds:
- group: ""
Expand Down
3 changes: 3 additions & 0 deletions chart/jetstacksecure-mp/templates/billing-agent-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: "ubbagent-config"
namespace: "{{ .Release.Namespace }}"
labels:
helm.sh/chart: "{{ .Chart.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: ubbagent
app.kubernetes.io/instance: "{{ .Release.Name | trunc 63 | trimSuffix "-" }}"

data:
config.yaml: |
# The identity section contains authentication information used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name | trunc 63 | trimSuffix "-" }}-ubbagent
namespace: {{ .Release.Namespace | quote }}
labels:
helm.sh/chart: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/name: {{ .Release.Name | trunc 63 | trimSuffix "-" }}
app.kubernetes.io/instance: {{ .Release.Name | trunc 63 | trimSuffix "-" }}
app.kubernetes.io/component: ubbagent
spec:
replicas: 1
Expand All @@ -30,12 +32,12 @@ spec:
- name: AGENT_ENCODED_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.ubbagent.reportingSecretName }}
name: {{ default (print (.Release.Name | trunc 63 | trimSuffix "-") "-license") .Values.ubbagent.reportingSecretName }}
key: reporting-key
- name: AGENT_CONSUMER_ID
valueFrom:
secretKeyRef:
name: {{ .Values.ubbagent.reportingSecretName }}
name: {{ default (print (.Release.Name | trunc 63 | trimSuffix "-") "-license") .Values.ubbagent.reportingSecretName }}
key: consumer-id
volumeMounts:
- name: ubbagent-config
Expand Down
33 changes: 29 additions & 4 deletions chart/jetstacksecure-mp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,52 @@ cert-manager:
create: false # see note (1)
serviceAccount:
create: false # see note (1)
image:
repository: marketplace.gcr.io/jetstack-public/jetstack-secure-for-cert-manager
tag: 1.1.0-gcm.1

acmesolver:
image:
repository: marketplace.gcr.io/jetstack-public/jetstack-secure-for-cert-manager/cert-manager-acmesolver
tag: 1.1.0-gcm.1

webhook:
serviceAccount:
create: false # see note (1)
image:
repository: marketplace.gcr.io/jetstack-public/jetstack-secure-for-cert-manager/cert-manager-webhook
tag: 1.1.0-gcm.1

cainjector:
serviceAccount:
create: false # see note (1)
image:
repository: marketplace.gcr.io/jetstack-public/jetstack-secure-for-cert-manager/cert-manager-cainjector
tag: 1.1.0-gcm.1

google-cas-issuer:
installCRDs: true
serviceAccount:
create: false # see note (1)
image:
repository: marketplace.gcr.io/jetstack-public/jetstack-secure-for-cert-manager/cert-manager-google-cas-issuer
tag: 1.1.0-gcm.1

preflight:
serviceAccount:
# name: foo
create: false # see note (1)
rbac:
create: false # see note (1)
image:
repository: marketplace.gcr.io/jetstack-public/jetstack-secure-for-cert-manager/preflight
tag: 1.1.0-gcm.1

ubbagent:
# reportingSecretName: "some-secret-name"
# By default, the reportingSecretName will be set to
# ${helm-release}-license.
#
# reportingSecretName: chartname-license
image:
{}
# tag: 1.1.0
# repository: gcr.io/jetstack-public/ubbagent
repository: marketplace.gcr.io/jetstack-public/jetstack-secure-for-cert-manager/ubbagent
tag: 1.1.0-gcm.1
9 changes: 4 additions & 5 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ steps:
done
pod=$(kubectl -n "$ns" get pods -oname | grep "apptest-.*-deployer" | cut -d/ -f2)

kubectl wait -n "$ns" --for=condition=ready pod $pod
kubectl wait -n "$ns" --for=condition=ready --timeout=5m pod $pod
kubectl logs -n "$ns" $pod -f --tail=-1
waitFor:
- check-cloud-marketplace-tools
Expand All @@ -292,13 +292,12 @@ steps:
ns=$(kubectl get ns -oname | grep apptest- | cut -d/ -f2)

while : ; do
kubectl -n "$ns" get pods -oname | grep "apptest-.*-smoke-test-pod" && break
kubectl -n "$ns" get pods -oname | grep "smoke-test-pod" && break
sleep 10
done
pod=$(kubectl -n "$ns" get pods -oname | grep "apptest-.*-smoke-test-pod" | cut -d/ -f2)

kubectl wait -n "$ns" --for=condition=ready pod $pod
kubectl logs -n "$ns" $pod -f --tail=-1
kubectl wait -n "$ns" --for=condition=ready --timeout=5m pod smoke-test-pod
kubectl logs -n "$ns" smoke-test-pod -f --tail=-1
waitFor:
- check-cloud-marketplace-tools
- push-deployer
Expand Down
8 changes: 8 additions & 0 deletions data-test/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ properties:
default: $IMAGE
x-google-property:
type: IMAGE

# We had to disable preflight so that `mpdev verify` would not fail. It
# fails due to the fact that the preflight deployment never becomes
# "ready" since the secret "agent-credentials" and the configmap
# "agent-config" are absent from the cluster.
preflight.replicaCount:
type: integer
default: 0
Loading