Merge pull request #14 from kairos-io/osbuilder-update

Updated os builder to include new export changes
This commit is contained in:
Jacob Payne 2023-05-30 11:01:27 -07:00 committed by GitHub
commit 4797baad05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 8120 additions and 181 deletions

View File

@ -1,10 +1,10 @@
apiVersion: v2
name: kairos-crds
description: A Helm chart for deploying the Kairos CRDs
icon:
icon: ""
type: application
home: https://kairos.io/
maintainers:
- name: Ettore Di Giacinto
email: mudler@kairos.io
version: 0.0.13
version: 0.0.14

File diff suppressed because it is too large Load Diff

View File

View File

@ -1,12 +1,12 @@
apiVersion: v2
name: osbuilder
description: A Helm chart for osbuilder
icon:
icon: ""
type: application
home: https://kairos.io/
maintainers:
- name: Ettore Di Giacinto
email: mudler@kairos.io
version: 0.5.5
appVersion: "v0.5.2"
version: 0.6.0
appVersion: "v0.7.0"

View File

@ -0,0 +1,21 @@
To access the artifacts generated by your OSArtifact objects from the included nginx server add the following export to
your OSArtifact at `.spec.exporters[]`.
template:
spec:
restartPolicy: Never
containers:
- name: upload
image: {{ .Values.image.toolsRepository | default "quay.io/kairos/osbuilder-tools" }}:{{ .Values.image.tag | default .Chart.AppVersion }}
command:
- bash
args:
- -c
- |
for f in $(ls /artifacts)
do
curl -T /artifacts/$f http://osartifactbuilder-operator-osbuilder-nginx/upload/$f
done
volumeMounts:
- name: artifacts
mountPath: /artifacts

View File

@ -17,3 +17,38 @@ kind: ConfigMap
metadata:
name: osartifactbuilder-operator-manager-config
namespace: '{{.Release.Namespace}}'
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
nginx.conf: |
server {
listen 80;
server_name localhost;
client_max_body_size 5000M;
#access_log /var/log/nginx/host.access.log main;
location ~ "/upload/([0-9a-zA-Z-.]*)$" {
alias /usr/share/nginx/html/$1;
client_body_temp_path /tmp;
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
dav_access group:rw all:r;
}
location / {
root /usr/share/nginx/html;
autoindex on;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -48,12 +48,7 @@ spec:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
- --tool-image={{ .Values.image.repository | default "quay.io/kairos/osbuilder-tools" }}:{{ .Values.image.tag | default .Chart.AppVersion }}
- --serve-image={{ .Values.image.serving | default "nginx" }}
- --copy-to-namespace={{ .Release.Namespace }}
- --copy-role=osartifactbuilder-operator-artifactCopier
- --copy-to-pod-label=app.kubernetes.io/name=osbuilder-nginx
- --copy-to-path="/usr/share/nginx/html"
- '--tool-image={{ .Values.image.toolsRepository | default "quay.io/kairos/osbuilder-tools" }}:{{ .Values.image.tag | default .Chart.AppVersion }}'
command:
- /manager
image: '{{ .Values.image.repository | default "quay.io/kairos/osbuilder" }}:{{ .Values.image.tag | default .Chart.AppVersion }}'
@ -118,9 +113,20 @@ spec:
volumeMounts:
- mountPath: /usr/share/nginx/html
name: nginx-public
- mountPath: /etc/nginx/conf.d
name: config
readOnly: true
serviceAccountName: '{{ include "helm-chart.serviceAccountName" . }}'
terminationGracePeriodSeconds: 10
securityContext:
fsGroup: 101
volumes:
- name: nginx-public
persistentVolumeClaim:
claimName: osartifactbuilder-operator-nginx-public
- name: config
configMap:
name: nginx-config
items:
- key: nginx.conf
path: default.conf

View File

@ -1,25 +1,5 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: osartifactbuilder-operator-artifactCopier
namespace: '{{.Release.Namespace}}'
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- get
- apiGroups:
- ""
resources:
- pods/exec
verbs:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: osartifactbuilder-operator-leader-election-role
namespace: '{{.Release.Namespace}}'
@ -64,27 +44,45 @@ rules:
- apiGroups:
- ""
resources:
- serviceaccounts
- configmaps
verbs:
- create
- get
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- rbac.authorization.k8s.io
- ""
resources:
- roles
- rolebindings
- pods
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- build.kairos.io
@ -112,41 +110,6 @@ rules:
- get
- patch
- update
- apiGroups:
- build.kairos.io
resources:
- osartifacts/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- create
- update
- apiGroups:
- batch
resources:
- jobs
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- get
- apiGroups:
- ""
resources:
- pods/exec
verbs:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole

View File

@ -12,6 +12,7 @@ imagePullSecrets: []
image:
# controller image to be used. Leave empty to use
repository: ""
toolsRepository: ""
# image tag, leave empty to use chart's AppVersion
tag: ""