Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add arm64 helm chart, update verison from 1.6.0 to 1.6.1 #158

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GO=env $(GO_ENV) $(GO_MODULE) go
UNAME := $(shell uname)

ifeq ($(BLADE_VERSION), )
BLADE_VERSION=1.6.0
BLADE_VERSION=1.6.1
endif
ifeq ($(BLADE_VENDOR), )
BLADE_VENDOR=community
Expand Down Expand Up @@ -45,7 +45,7 @@ build_image:
operator-sdk build --go-build-args="$(GO_FLAGS)" chaosblade-operator:${BLADE_VERSION}

build_image_arm64:
GOOS="linux" GOARCH="arm64" operator-sdk build --go-build-args="$(GO_FLAGS)" chaosblade-operator:${BLADE_VERSION}
GOOS="linux" GOARCH="arm64" operator-sdk build --go-build-args="$(GO_FLAGS)" chaosblade-operator-arm64:${BLADE_VERSION}

# only build_fuse and yaml
build_linux:
Expand Down
21 changes: 21 additions & 0 deletions deploy/helm/chaosblade-operator-arm64/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
6 changes: 6 additions & 0 deletions deploy/helm/chaosblade-operator-arm64/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
appVersion: "1.6.1"
description: ChaosBlade Operator
name: chaosblade-operator-arm64
version: 1.6.1
home: https://github.com/chaosblade-io
155 changes: 155 additions & 0 deletions deploy/helm/chaosblade-operator-arm64/crds/crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: chaosblades.chaosblade.io
spec:
group: chaosblade.io
names:
kind: ChaosBlade
listKind: ChaosBladeList
plural: chaosblades
singular: chaosblade
shortNames: [blade]
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ChaosBlade is the Schema for the chaosblades 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: ChaosBladeSpec defines the desired state of ChaosBlade
properties:
experiments:
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
Important: Run "operator-sdk generate k8s" to regenerate code after
modifying this file Add custom validation using kubebuilder tags:
https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
items:
properties:
action:
description: Action is the experiment scenario of the target,
such as delay, load
type: string
desc:
description: Desc is the experiment description
type: string
matchers:
description: Matchers is the experiment rules
items:
properties:
name:
description: Name is the name of flag
type: string
value:
description: 'TODO: Temporarily defined as an array for
all flags Value is the value of flag'
items:
type: string
type: array
required:
- name
- value
type: object
type: array
scope:
description: Scope is the area of the experiments, currently support
node, pod and container
type: string
target:
description: Target is the experiment target, such as cpu, network
type: string
required:
- action
- scope
- target
type: object
type: array
required:
- experiments
type: object
status:
description: ChaosBladeStatus defines the observed state of ChaosBlade
properties:
expStatuses:
description: 'Important: Run "operator-sdk generate k8s" to regenerate
code after modifying this file Add custom validation using kubebuilder
tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
items:
properties:
action:
type: string
error:
type: string
resStatuses:
description: ResStatuses is the details of the experiment
items:
properties:
error:
description: experiment error
type: string
id:
description: experiment uid in chaosblade
type: string
identifier:
description: 'Resource identifier, rules as following: container:
Namespace/NodeName/PodName/ContainerName pod: Namespace/NodeName/PodName'
type: string
kind:
description: Kind
type: string
state:
description: experiment state
type: string
success:
description: success
type: boolean
required:
- kind
- state
- success
type: object
type: array
scope:
description: experiment scope for cache
type: string
state:
description: State is used to describe the experiment result
type: string
success:
description: Success is used to judge the experiment result
type: boolean
target:
type: string
required:
- action
- scope
- state
- success
- target
type: object
type: array
phase:
description: Phase indicates the state of the experiment Initial ->
Running -> Updating -> Destroying -> Destroyed
type: string
required:
- expStatuses
type: object
type: object
served: true
storage: true
subresources:
status: {}
1 change: 1 addition & 0 deletions deploy/helm/chaosblade-operator-arm64/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thank you for using chaosblade.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{/* vim: set filetype=mustache: */}}
109 changes: 109 additions & 0 deletions deploy/helm/chaosblade-operator-arm64/templates/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{{- if .Values.daemonset.enable }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: chaosblade-tool
labels:
name: chaosblade-tool
app: chaosblade-tool
spec:
selector:
matchLabels:
name: chaosblade-tool
app: chaosblade-tool
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
name: chaosblade-tool
app: chaosblade-tool
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubelet
containers:
- name: chaosblade-tool
image: {{ .Values.blade.repository }}:{{ .Values.blade.version }}
imagePullPolicy: {{ .Values.blade.pullPolicy }}
env:
- name: KUBERNETES_NODENAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: DOCKER_API_VERSION
value: "1.14.0"
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-socket
- mountPath: /opt/chaosblade/chaosblade.dat
name: chaosblade-db-volume
- mountPath: /etc/hosts
name: hosts
- mountPath: /var/log/audit
name: audit
- mountPath: /var/lib/docker
name: docker-lib
- mountPath: /etc/docker
name: docker-etc
- mountPath: /run/containerd
name: containerd
- mountPath: /var/lib/containerd
name: containerd-lib
- mountPath: /etc/containerd
name: containerd-etc
- mountPath: /var/run/netns
name: netns
- mountPath: /host-sys
name: sys
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
hostPID: true
tolerations:
- effect: NoSchedule
operator: Exists
volumes:
- hostPath:
path: /var/run/docker.sock
name: docker-socket
- hostPath:
path: /var/run/chaosblade.dat
type: FileOrCreate
name: chaosblade-db-volume
- hostPath:
path: /etc/hosts
name: hosts
- hostPath:
path: /var/lib/docker
name: docker-lib
- hostPath:
path: /etc/docker
name: docker-etc
- hostPath:
path: /var/log/audit
name: audit
- hostPath:
path: /run/containerd
name: containerd
- hostPath:
path: /var/lib/containerd
name: containerd-lib
- hostPath:
path: /etc/containerd
name: containerd-etc
- hostPath:
path: /var/run/netns
name: netns
- hostPath:
path: /sys
name: sys
serviceAccountName: chaosblade
{{- end }}
74 changes: 74 additions & 0 deletions deploy/helm/chaosblade-operator-arm64/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: chaosblade-operator
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
name: chaosblade-operator
template:
metadata:
labels:
name: chaosblade-operator
part-of: chaosblade
spec:
dnsPolicy: {{ .Values.network.dns.policy }}
hostNetwork: {{ .Values.network.host }}
serviceAccountName: chaosblade
containers:
- name: chaosblade-operator
image: {{ .Values.operator.repository }}:{{ .Values.operator.version }}
command: ["chaosblade-operator"]
args:
{{- if .Values.blade.repository }}
- '--chaosblade-image-repository={{ .Values.blade.repository }}'
{{- end }}
{{- if .Values.blade.version }}
- '--chaosblade-version={{ .Values.blade.version }}'
{{- end }}
{{- if .Values.blade.pullPolicy }}
- '--chaosblade-image-pull-policy={{ .Values.blade.pullPolicy }}'
{{- end }}
{{- if .Values.env.zapLevel }}
- '--zap-level={{ .Values.env.zapLevel }}'
{{- end }}
{{- if .Values.env.logLevel }}
- '--log-level={{ .Values.env.logLevel }}'
{{- end }}
{{- if .Values.webhook.enable }}
- '--webhook-enable'
{{- end }}
{{- if .Values.daemonset.enable }}
- '--daemonset-enable'
{{- end }}
{{- if .Values.remove.blade.interval }}
- '--remove-blade-interval={{ .Values.remove.blade.interval }}'
{{- end }}
{{- if .Values.blade.downloadUrl }}
- '--chaosblade-download-url={{ .Values.blade.downloadUrl }}'
{{- end }}
- '--chaosblade-namespace={{ .Release.Namespace }}'
imagePullPolicy: {{ .Values.operator.pullPolicy }}
env:
- name: WATCH_NAMESPACE
value: ""
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaosblade-operator"
ports:
- containerPort: 9443
protocol: TCP
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
volumes:
- name: cert
secret:
defaultMode: 420
secretName: chaosblade-webhook-server-cert
Loading