Skip to content

Commit 812f6d1

Browse files
committed
openshift-pipelines added to pattern
- Externalized charts for pipelines, hypershift and cluster-autoscaler - Pipelines have been added for deploying hive and hypershift clusters - Added chart for hcp-cli imagestream - Added letsencrypt(cert-manager) chart
1 parent 7766fe9 commit 812f6d1

28 files changed

Lines changed: 501 additions & 442 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ vault.init
88
super-linter.log
99
common/pattern-vault.init
1010
.cursor/*
11+
examples/*

charts/all/hcp-cli/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: hcp-cli
3+
description: Builds the hcp CLI from ConsoleCLIDownload into an ImageStream for pipeline use
4+
type: application
5+
version: 0.1.0
6+
appVersion: "0.1.0"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: build.openshift.io/v1
2+
kind: BuildConfig
3+
metadata:
4+
name: {{ .Values.buildConfig.name }}
5+
namespace: {{ .Values.namespace }}
6+
spec:
7+
{{- if .Values.buildConfig.schedule }}
8+
triggers:
9+
- type: ConfigChange
10+
- type: Cron
11+
cron:
12+
schedule: {{ .Values.buildConfig.schedule | quote }}
13+
{{- else }}
14+
triggers:
15+
- type: ConfigChange
16+
{{- end }}
17+
runPolicy: Serial
18+
serviceAccount: {{ .Values.serviceAccount.name }}
19+
source:
20+
type: Dockerfile
21+
dockerfile: |
22+
FROM {{ .Values.buildConfig.baseImage }} AS base
23+
24+
USER root
25+
RUN curl -sSL "http://{{ .Values.buildConfig.hcpDownloadService }}/linux/amd64/hcp.tar.gz" \
26+
-o /tmp/hcp.tar.gz && \
27+
tar xzf /tmp/hcp.tar.gz -C /usr/local/bin && \
28+
chmod +x /usr/local/bin/hcp && \
29+
rm -f /tmp/hcp.tar.gz && \
30+
hcp version
31+
strategy:
32+
type: Docker
33+
dockerStrategy:
34+
noCache: true
35+
output:
36+
to:
37+
kind: ImageStreamTag
38+
name: {{ .Values.imageStream.name }}:latest
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: image.openshift.io/v1
2+
kind: ImageStream
3+
metadata:
4+
name: {{ .Values.imageStream.name }}
5+
namespace: {{ .Values.namespace }}
6+
spec:
7+
lookupPolicy:
8+
local: true
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: {{ .Values.serviceAccount.name }}
5+
namespace: {{ .Values.namespace }}
6+
---
7+
apiVersion: rbac.authorization.k8s.io/v1
8+
kind: ClusterRole
9+
metadata:
10+
name: {{ .Values.serviceAccount.name }}
11+
rules:
12+
- apiGroups: ["console.openshift.io"]
13+
resources: ["consoleclidownloads"]
14+
verbs: ["get"]
15+
---
16+
apiVersion: rbac.authorization.k8s.io/v1
17+
kind: ClusterRoleBinding
18+
metadata:
19+
name: {{ .Values.serviceAccount.name }}
20+
roleRef:
21+
apiGroup: rbac.authorization.k8s.io
22+
kind: ClusterRole
23+
name: {{ .Values.serviceAccount.name }}
24+
subjects:
25+
- kind: ServiceAccount
26+
name: {{ .Values.serviceAccount.name }}
27+
namespace: {{ .Values.namespace }}
28+
---
29+
apiVersion: rbac.authorization.k8s.io/v1
30+
kind: RoleBinding
31+
metadata:
32+
name: {{ .Values.serviceAccount.name }}-builder
33+
namespace: {{ .Values.namespace }}
34+
roleRef:
35+
apiGroup: rbac.authorization.k8s.io
36+
kind: ClusterRole
37+
name: system:image-builder
38+
subjects:
39+
- kind: ServiceAccount
40+
name: {{ .Values.serviceAccount.name }}
41+
namespace: {{ .Values.namespace }}

charts/all/hcp-cli/values.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace: cluster-provisioning
2+
3+
imageStream:
4+
name: hcp-cli
5+
6+
buildConfig:
7+
name: hcp-cli
8+
# Base image that provides oc + kubectl
9+
baseImage: quay.io/openshift/origin-cli:latest
10+
# Schedule periodic rebuilds to pick up new hcp versions (cron format, empty to disable)
11+
schedule: ""
12+
# Internal service that serves the hcp CLI binaries (runs in the multicluster-engine namespace)
13+
hcpDownloadService: hcp-cli-download.multicluster-engine.svc.cluster.local
14+
15+
serviceAccount:
16+
# SA used by the BuildConfig — needs permission to read consoleclidownloads
17+
name: hcp-cli-builder

charts/all/hypershift/.helmignore

Lines changed: 0 additions & 26 deletions
This file was deleted.

charts/all/hypershift/Chart.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

charts/all/hypershift/templates/autoscaling/clusterautoscaler.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

charts/all/hypershift/templates/autoscaling/machineautoscaler.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)