Skip to content

Commit

Permalink
Merge branch 'main' into support/test-for-kbagent
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-inf committed Aug 26, 2024
2 parents a1bb01a + f8b783e commit 59a0d2b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 29 deletions.
23 changes: 3 additions & 20 deletions controllers/apps/transformer_component_account_provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package apps

import (
"fmt"
"strings"

"golang.org/x/exp/slices"
Expand Down Expand Up @@ -178,28 +177,12 @@ func (t *componentAccountProvisionTransformer) markAccountProvisioned(cond *meta

func (t *componentAccountProvisionTransformer) lifecycleAction(transCtx *componentTransformContext) (lifecycle.Lifecycle, error) {
synthesizedComp := transCtx.SynthesizeComponent

// TODO(v1.0): remove this, and use the role selector in lifecycle action.
roleName := ""
for _, role := range synthesizedComp.Roles {
if role.Serviceable && role.Writable {
roleName = role.Name
}
}
if roleName == "" {
return nil, nil
}

pods, err := component.ListOwnedPodsWithRole(transCtx.Context, transCtx.Client,
synthesizedComp.Namespace, synthesizedComp.ClusterName, synthesizedComp.Name, roleName)
pods, err := component.ListOwnedPods(transCtx.Context, transCtx.Client,
synthesizedComp.Namespace, synthesizedComp.ClusterName, synthesizedComp.Name)
if err != nil {
return nil, err
}
if len(pods) == 0 {
return nil, fmt.Errorf("unable to find appropriate pods to create accounts")
}

lfa, err := lifecycle.New(transCtx.SynthesizeComponent, pods[0])
lfa, err := lifecycle.New(transCtx.SynthesizeComponent, nil, pods...)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ spec:
key: values-kubeblocks-override.yaml

valuesMapping:
valueMap:

jsonMap:
tolerations: tolerations

resources:
cpu:
requests: resources.requests.cpu
Expand Down
9 changes: 5 additions & 4 deletions deploy/helm/templates/applications/csi-driver-nfs-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ spec:
{{- include "kubeblocks.addonChartsImage" . | indent 4 }}
{{- include "kubeblocks.addonHelmInstallOptions" (dict "version" "4.5.0" "values" .Values) | indent 4 }}

{{- $cloudProvider := (include "kubeblocks.cloudProvider" .) }}
{{- if eq $cloudProvider "huaweiCloud" }}
installValues:
{{- $cloudProvider := (include "kubeblocks.cloudProvider" .) }}
{{- if eq $cloudProvider "huaweiCloud" }}
setValues:
- kubeletDir=/mnt/paas/kubernetes/kubelet
{{- else if eq $cloudProvider "gcp" }}
{{- else if eq $cloudProvider "gcp" }}
# In GKE, the system-node-critical and system-cluster-critical priority classes
# can't be used for non-system pods, but csi-driver-nfs uses "system-cluster-critical"
# by default, so override them here.
installValues:
setValues:
- controller.priorityClassName=""
- node.priorityClassName=""
- externalSnapshotter.priorityClassName=""
{{- end }}
{{- end }}

valuesMapping:
valueMap:
Expand Down
1 change: 0 additions & 1 deletion deploy/helm/templates/applications/grafana-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ spec:

defaultInstallValues:
- replicas: 1
storageClass:
resources:
requests:
storage: 1Gi
Expand Down
1 change: 0 additions & 1 deletion deploy/helm/templates/applications/loki-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ spec:

defaultInstallValues:
- replicas: 1
storageClass:
resources:
requests:
storage: 8Gi
Expand Down

0 comments on commit 59a0d2b

Please sign in to comment.