Skip to content

Commit

Permalink
Added cluster builder, store and stack for kpack
Browse files Browse the repository at this point in the history
  • Loading branch information
wangeguo committed Jan 1, 2023
1 parent af61886 commit dce39b5
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/amphitheatre/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.2.1
version: 0.2.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
19 changes: 19 additions & 0 deletions charts/amphitheatre/templates/cluster-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: kpack.io/v1alpha2
kind: ClusterBuilder
metadata:
name: amp-default-builder
spec:
tag: core.harbor.domain/library/amp-default-builder
stack:
name: base
kind: ClusterStack
store:
name: default
kind: ClusterStore
serviceAccountRef:
name: kpack-service-account
order:
- group:
- id: paketo-buildpacks/java
- group:
- id: paketo-buildpacks/nodejs
10 changes: 10 additions & 0 deletions charts/amphitheatre/templates/cluster-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kpack.io/v1alpha2
kind: ClusterStack
metadata:
name: base
spec:
id: "io.buildpacks.stacks.bionic"
buildImage:
image: "paketobuildpacks/build:base-cnb"
runImage:
image: "paketobuildpacks/run:base-cnb"
8 changes: 8 additions & 0 deletions charts/amphitheatre/templates/cluster-store.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kpack.io/v1alpha2
kind: ClusterStore
metadata:
name: default
spec:
sources:
- image: gcr.io/paketo-buildpacks/java
- image: gcr.io/paketo-buildpacks/nodejs
10 changes: 10 additions & 0 deletions charts/amphitheatre/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: harbor-registry-credentials
annotations:
kpack.io/docker: https://core.harbor.domain/
type: kubernetes.io/basic-auth
stringData:
username: admin
password: Harbor12345
14 changes: 5 additions & 9 deletions charts/amphitheatre/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "amphitheatre.serviceAccountName" . }}
labels:
{{- include "amphitheatre.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
name: kpack-service-account
secrets:
- name: harbor-registry-credentials
imagePullSecrets:
- name: harbor-registry-credentials

0 comments on commit dce39b5

Please sign in to comment.