Compare commits
3 Commits
93ee859227
...
01e4c38185
Author | SHA1 | Date | |
---|---|---|---|
01e4c38185
|
|||
b33d4d92ad
|
|||
b4941e435e
|
@@ -13,7 +13,7 @@ GEM
|
||||
mini_mime (>= 1.0.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
json (2.12.2)
|
||||
jwt (3.1.1)
|
||||
jwt (3.1.2)
|
||||
base64
|
||||
ksuid (1.0.0)
|
||||
language_server-protocol (3.17.0.5)
|
||||
@@ -102,7 +102,7 @@ GEM
|
||||
rack-protection (= 4.1.1)
|
||||
sinatra (= 4.1.1)
|
||||
tilt (~> 2.0)
|
||||
sorbet-runtime (0.5.12204)
|
||||
sorbet-runtime (0.5.12210)
|
||||
standard (1.50.0)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.0)
|
||||
|
20
app.rb
20
app.rb
@@ -12,6 +12,8 @@ require "securerandom"
|
||||
require "random/formatter"
|
||||
require "ulid"
|
||||
require "anyflake"
|
||||
require "cuid2"
|
||||
require "ksuid"
|
||||
|
||||
require "jwt"
|
||||
|
||||
@@ -362,6 +364,24 @@ get "/snowflake" do
|
||||
end
|
||||
end
|
||||
|
||||
get "/cuid2" do
|
||||
n = params.fetch(:n, 1).to_i
|
||||
stream do |out|
|
||||
n.times do |_|
|
||||
out << format("%s\n", Cuid2.generate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
get "/ksuid" do
|
||||
n = params.fetch(:n, 1).to_i
|
||||
stream do |out|
|
||||
n.times do |_|
|
||||
out << format("%s\n", KSUID.new)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
post "/quit" do
|
||||
Process.kill("TERM", ppid)
|
||||
nil
|
||||
|
19
kustomize/app/cronjob.yaml
Normal file
19
kustomize/app/cronjob.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: kubernaut
|
||||
spec:
|
||||
schedule: "* * * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: hello
|
||||
image: busybox:1.37
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- echo "=^.^= <(meow)"
|
||||
restartPolicy: OnFailure
|
@@ -7,3 +7,4 @@ resources:
|
||||
- deployment.yaml
|
||||
- hpa.yaml
|
||||
- services.yaml
|
||||
- cronjob.yaml
|
||||
|
Reference in New Issue
Block a user