You might want to add some service account to ClusterRoleBinding/psp:privileged
kubectl apply -f eks-restricted-psp.yml
# delete default role binding
kubectl delete clusterrolebinding eks:podsecuritypolicy:authenticated| #!/bin/sh | |
| url="${1}" | |
| mime="$(handlr mime --json "${url}" | jq -r '.[0].mime')" | |
| handler="$(handlr get --json "${mime}" | jq -r '.handler')" | |
| exec app2unit "${handler}" "${url}" |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "io" | |
| "log/slog" | |
| "net/http" | |
| "os" | |
| "path/filepath" |
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "errors" | |
| "fmt" | |
| "hash/maphash" | |
| "io" | |
| "os" |
| type MatcherNode<T> = { | |
| children: Record<string, MatcherNode<T>>; | |
| glob?: Array<MatcherNode<T>>; | |
| glob2?: Array<MatcherNode<T>>; | |
| value?: T; | |
| }; | |
| // sorry, I exercise here. | |
| class GlobMatcher<T> { | |
| root: MatcherNode<T>; |
| # need sudo | |
| ffmpeg -device /dev/dri/card0 -f kmsgrab -framerate 60 -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=format=nv12' -c:v hevc_vaapi output-$(date +%s).mp4 | |
| # tested with amdgpu |
| package main | |
| import ( | |
| "bytes" | |
| "compress/gzip" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "os" | |
| "testing" |
| #!/usr/bin/env python3 | |
| import http.client | |
| import json | |
| import datetime | |
| conn = http.client.HTTPSConnection("services5.arcgis.com") | |
| def main(): | |
| cur_date = datetime.datetime.now().strftime('%Y-%m-%d') |
| Jenkins.instance.slaves.each { | |
| def comp = it.getComputer() | |
| if (comp.isOffline()) { | |
| comp.doDoDelete() | |
| } | |
| } |
| import jenkins.model.Jenkins | |
| Jenkins.instanceOrNull.allItems(hudson.model.Job).each { job -> | |
| if (job.isBuildable() && job.supportsLogRotator() && job.getProperty(jenkins.model.BuildDiscarderProperty) == null) { | |
| println "Processing \"${job.fullDisplayName}\"" | |
| try { | |
| job.setBuildDiscarder(new hudson.tasks.LogRotator ( 14, -1, 14, -1)) | |
| println "${job.fullName} is updated" | |
| } catch (Exception e) { | |
| // Some implementation like for example the hudson.matrix.MatrixConfiguration supports a LogRotator but not setting it |
You might want to add some service account to ClusterRoleBinding/psp:privileged
kubectl apply -f eks-restricted-psp.yml
# delete default role binding
kubectl delete clusterrolebinding eks:podsecuritypolicy:authenticated