Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Infrastructure GitOps
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shivering-Isles
Infrastructure GitOps
Commits
b230eb31
Verified
Commit
b230eb31
authored
1 year ago
by
Sheogorath
Browse files
Options
Downloads
Patches
Plain Diff
fix(longhorn): Workaround for share-manager problems
parent
74b1db3d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
infrastructure/longhorn/hotfix-7183.yaml
+70
-0
70 additions, 0 deletions
infrastructure/longhorn/hotfix-7183.yaml
with
70 additions
and
0 deletions
infrastructure/longhorn/hotfix-7183.yaml
0 → 100644
+
70
−
0
View file @
b230eb31
apiVersion
:
batch/v1
kind
:
CronJob
metadata
:
name
:
longhorn-hotfix-7183
spec
:
jobTemplate
:
spec
:
template
:
spec
:
serviceAccountName
:
longhorn-hotfix-7183
containers
:
-
image
:
docker.io/bitnami/kubectl:1.28
name
:
longhorn-hotfix
resources
:
requests
:
cpu
:
10m
memory
:
128Mi
limits
:
cpu
:
"
1"
memory
:
256Mi
command
:
-
/bin/bash
args
:
-
-c
-
|
for i in $(kubectl get lhsm -n longhorn-system --no-headers -o custom-columns=NAME:metadata.name); do
if kubectl get pods --no-headers -n longhorn-system "share-manager-$i" | grep -v Running; then
kubectl patch lhsm -n longhorn-system --type=merge --subresource status --patch 'status: {state: error}' $i
fi
done
restartPolicy
:
OnFailure
schedule
:
'
*/5
*
*
*
*'
---
apiVersion
:
v1
kind
:
ServiceAccount
metadata
:
name
:
longhorn-hotfix-7183
---
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
Role
metadata
:
name
:
longhorn-hotfix-7183
rules
:
-
apiGroups
:
-
"
"
resources
:
-
pods
verbs
:
-
get
-
apiGroups
:
-
"
longhorn.io"
resources
:
-
sharemanagers
-
sharemanagers/status
verbs
:
-
patch
-
get
-
list
---
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
RoleBinding
metadata
:
name
:
longhorn-hotfix-7183
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
Role
name
:
longhorn-hotfix-7183
subjects
:
-
kind
:
ServiceAccount
name
:
longhorn-hotfix-7183
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment