Skip to content

Commit

Permalink
update some files for release v1.7.1 (#189)
Browse files Browse the repository at this point in the history
* update for v1.7.1

Signed-off-by: yandongxiao <[email protected]>

* Update scripts/artifacts.sh

Co-authored-by: Kevin Cai <[email protected]>

---------

Signed-off-by: yandongxiao <[email protected]>
Co-authored-by: Kevin Cai <[email protected]>
  • Loading branch information
yandongxiao and kevincai authored Jul 24, 2023
1 parent 1b24e7b commit 36d0a57
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 26 deletions.
6 changes: 1 addition & 5 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,12 @@ spec:
control-plane: starrocks-controller
spec:
automountServiceAccountToken: true
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- command:
- /sroperator
args:
- --leader-elect
image: starrocks/operator:v1.7.0
image: starrocks/operator:v1.7.1
name: sroperator
securityContext:
runAsNonRoot: true
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/charts/kube-starrocks/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ maintainers:
# This is the chart version. This version number should be incremented each time you make changes

# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.7.0
version: 1.7.1

# 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
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ spec:
version: {{ $.Chart.Version }}
spec:
automountServiceAccountToken: true
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- command:
- /sroperator
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/charts/kube-starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ starrocksOperator:
image:
# image sliced by "repository:tag"
repository: starrocks/operator
tag: v1.7.0
tag: v1.7.1
imagePullPolicy: Always
replicaCount: 1
resources:
Expand Down
31 changes: 30 additions & 1 deletion index.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
apiVersion: v1
entries:
kube-starrocks:
- apiVersion: v2
appVersion: 3.0-latest
created: "2023-07-24T13:41:27.363509+08:00"
description: kube-starrocks collects Kubernetes manifests, starrocks combined
with documentation and scripts to provide easy to operate end-to-end Kubernetes
cluster deploy starrocks using the starrocks operator.
digest: 3b3805f1da9fd90358b5e5feb7184bfe175ad1b765d60ec3d0580f7c24af6f23
home: https://github.com/StarRocks/starrocks-kubernetes-operator
icon: https://avatars.githubusercontent.com/u/88238841
keywords:
- operator
- starrocks
- database
- olap
kubeVersion: '>=1.18.3-0'
maintainers:
- email: [email protected]
name: Kevin Cai
- email: [email protected]
name: SidaShen
- email: [email protected]
name: Dongxiao Yan
name: kube-starrocks
sources:
- https://github.com/StarRocks/starrocks
type: application
urls:
- https://github.com/StarRocks/starrocks-kubernetes-operator/releases/download/v1.7.1
version: 1.7.1
- apiVersion: v2
appVersion: 3.0-latest
created: "2023-07-14T16:21:49.261452+08:00"
Expand Down Expand Up @@ -60,4 +89,4 @@ entries:
urls:
- https://github.com/StarRocks/helm-charts/releases/download/kube-starrocks-1.6.1/kube-starrocks-1.6.1.tgz
version: 1.6.1
generated: "2023-07-14T16:21:49.260038+08:00"
generated: "2023-07-24T13:41:27.362572+08:00"
6 changes: 0 additions & 6 deletions pkg/k8sutils/templates/pod/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,22 +408,16 @@ func Annotations(spec v1.SpecInterface, clusterAnnotations map[string]string, no
}

func PodSecurityContext(spec v1.SpecInterface) *corev1.PodSecurityContext {
userId := int64(1000)
groupId := int64(1000)
onRootMismatch := corev1.FSGroupChangeOnRootMismatch
if spec.GetFsGroup() == nil {
sc := &corev1.PodSecurityContext{
FSGroup: rutils.GetInt64ptr(1000), // the starrocks user id is 1000
RunAsUser: &userId,
RunAsGroup: &groupId,
FSGroupChangePolicy: &onRootMismatch,
}
return sc
} else if *(spec.GetFsGroup()) != 0 {
sc := &corev1.PodSecurityContext{
FSGroupChangePolicy: &onRootMismatch,
RunAsUser: func() *int64 { v := int64(1000); return &v }(),
RunAsGroup: func() *int64 { v := int64(1000); return &v }(),
FSGroup: spec.GetFsGroup(),
}
return sc
Expand Down
6 changes: 0 additions & 6 deletions pkg/k8sutils/templates/pod/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,6 @@ func TestSpec(t *testing.T) {

func TestSecurityContext(t *testing.T) {
v := int64(10)
userId := int64(1000)
groupId := int64(1000)
onrootMismatch := corev1.FSGroupChangeOnRootMismatch

type args struct {
Expand All @@ -697,8 +695,6 @@ func TestSecurityContext(t *testing.T) {
},
want: &corev1.PodSecurityContext{
FSGroup: &v,
RunAsUser: &userId,
RunAsGroup: &groupId,
FSGroupChangePolicy: &onrootMismatch,
},
},
Expand All @@ -709,8 +705,6 @@ func TestSecurityContext(t *testing.T) {
},
want: &corev1.PodSecurityContext{
FSGroup: rutils.GetInt64ptr(1000),
RunAsUser: &userId,
RunAsGroup: &groupId,
FSGroupChangePolicy: &onrootMismatch,
},
},
Expand Down
7 changes: 5 additions & 2 deletions scripts/artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! /bin/sh

set -ex

# check parameter
if [ $# -ne 1 ]; then
echo "Usage: $0 <release_tag>"
Expand Down Expand Up @@ -35,10 +37,11 @@ fi
# helm repo index
url=https://github.com/StarRocks/starrocks-kubernetes-operator/releases/download/${release_tag}/${chart_name}-${chart_version}.tgz
if [ -f $HOME_PATH/index.yaml ]; then
helm repo index --merge $HOME_PATH/index.yaml --url $url $HOME_PATH
helm repo index --merge $HOME_PATH/index.yaml --url $url $HOME_PATH/helm-charts/charts/kube-starrocks
else
helm repo index --url $url $HOME_PATH
helm repo index --url $url $HOME_PATH/helm-charts/charts/kube-starrocks
fi
mv $HOME_PATH/helm-charts/charts/kube-starrocks/index.yaml $HOME_PATH/index.yaml

# the generated index.yaml is not correct, so we need to fix it
# the wrong one, e.g. https://github.com/StarRocks/starrocks-kubernetes-operator/releases/download/v1.7.0/kube-starrocks-1.7.0.tgz/artifacts/kube-starrocks-1.7.0.tgz
Expand Down

0 comments on commit 36d0a57

Please sign in to comment.