diff --git a/.final_builds/jobs/k3s-server/index.yml b/.final_builds/jobs/k3s-server/index.yml index 7ee41d1b..fd80701e 100644 --- a/.final_builds/jobs/k3s-server/index.yml +++ b/.final_builds/jobs/k3s-server/index.yml @@ -115,6 +115,10 @@ builds: version: b9298fe853acb9680ff2c3fbe595a70fed8ed7133fd57229f49c0d8a893fe87e blobstore_id: 485f371e-636d-46cf-51b0-bc176661c25d sha1: sha256:fb4739c3ddcfe126b0bba8569f5c3e79f3ed6014678e7f60eedc6eb1120bcad2 + c9072b3cee0a8f9e91d89f48f04caf9a33bf03932792d79921cec494e9a7f7d8: + version: c9072b3cee0a8f9e91d89f48f04caf9a33bf03932792d79921cec494e9a7f7d8 + blobstore_id: 42c7bf4a-c962-45d8-52b4-701206269192 + sha1: sha256:a5788503bf2966365afbe2e1f35adfbeee7af9aa9dfa88ee2edf9573ca03b6c2 ca23ca546f68cf61fcd1ab4e90c591f0dfed8aed6d48ff61fa546a9516c92150: version: ca23ca546f68cf61fcd1ab4e90c591f0dfed8aed6d48ff61fa546a9516c92150 blobstore_id: aa8b0336-14ec-40a7-460b-128f90104cca diff --git a/jobs/k3s-server/spec b/jobs/k3s-server/spec index 838eeaf9..65477955 100644 --- a/jobs/k3s-server/spec +++ b/jobs/k3s-server/spec @@ -155,6 +155,9 @@ properties: ## db options + k3s.embedded-ha-etcd: + description: if set, use embedded etcd in ha mode. requires an odd number of servers, overrides datastore-endpoints + k3s.datastore-endpoint: description: Specify etcd, Mysql, Postgres, or Sqlite (default) data source name k3s.datastore-cafile: diff --git a/jobs/k3s-server/templates/bin/ctl.erb b/jobs/k3s-server/templates/bin/ctl.erb index f2253ff6..aab2da9c 100755 --- a/jobs/k3s-server/templates/bin/ctl.erb +++ b/jobs/k3s-server/templates/bin/ctl.erb @@ -13,6 +13,7 @@ case $1 in export K3S_NODE_NAME=<%= spec.name %>-<%= spec.index %> + <% if_p('k3s.node_name_prefix') do |prefix| %> export K3S_NODE_NAME=<%= prefix %>-<%= spec.index %> <% end %> @@ -178,11 +179,26 @@ export FLAGS="$FLAGS --kube-apiserver-arg=audit-log-maxsize=10" <% end %> +#get bootstrap server in cluster +export BOOTSTRAP_SERVER=<%= link('k3s-server').instances[0].address %> + +<% if_p('k3s.embedded-ha-etcd') do |value| %> + +<% if spec.bootstrap %> +#bootstrap server: cluster-init +export FLAGS="$FLAGS --cluster-init" +<% else %> +#non bootstrap server: server reference +export FLAGS="$FLAGS --server=https://$BOOTSTRAP_SERVER:6443" +<% end %> +<% end %> + <% if_p('k3s.kubelet-config-file') do |value| %> export FLAGS="$FLAGS --kubelet-arg=config=/var/vcap/jobs/k3s-server/config/kubelet-config.yaml" <% end %> + echo $$ > $PIDFILE ulimit -n 1048576 # open files diff --git a/jobs/k3s-server/templates/bin/envrc b/jobs/k3s-server/templates/bin/envrc index baae4639..7fdeb5a6 100644 --- a/jobs/k3s-server/templates/bin/envrc +++ b/jobs/k3s-server/templates/bin/envrc @@ -5,6 +5,6 @@ export PATH=$PATH:/var/vcap/packages/k9s export PATH=$PATH:/var/vcap/packages/kubectl-k3s export PATH=$PATH:/var/vcap/packages/nerdctl -export KUBECONFIG=/var/vcap/store/k3s-server/kubeconfig.yml +export KUBECONFIG=/var/vcap/store/k3s-server/k3s.yaml alias crictl="k3s crictl -c /var/vcap/store/k3s-server/agent/etc/crictl.yaml" alias nerdctl="nerdctl --address /run/k3s/containerd/containerd.sock --namespace k8s.io" diff --git a/releases/k3s/index.yml b/releases/k3s/index.yml index abaa35fb..52e463eb 100644 --- a/releases/k3s/index.yml +++ b/releases/k3s/index.yml @@ -73,6 +73,8 @@ builds: version: "3" c9a1c25b-7712-43a1-6ecc-9c9374b62897: version: "15" + cfa286b8-a2ff-40dc-6bca-406e5c5e48db: + version: "124.7" d2b9074f-7e3e-4342-6e6c-a4384d82c822: version: "123" d465033d-b0d3-4d55-5ad0-a57940fec5c9: diff --git a/releases/k3s/k3s-124.7.yml b/releases/k3s/k3s-124.7.yml new file mode 100644 index 00000000..2809d1c9 --- /dev/null +++ b/releases/k3s/k3s-124.7.yml @@ -0,0 +1,65 @@ +name: k3s +version: "124.7" +commit_hash: 4a32c7a +uncommitted_changes: false +jobs: +- name: k3s-agent + version: 7047efd4e3b32a51634cb3fe3b3d37627a421f689eeb31a50237fa03d980d5eb + fingerprint: 7047efd4e3b32a51634cb3fe3b3d37627a421f689eeb31a50237fa03d980d5eb + sha1: sha256:e06362f1a059d7ad5d119894d291cba75cefc71c878c8ac0f2212c0a913826af + packages: + - k3s + - kubectl-k3s + - k3s-images + - nerdctl +- name: k3s-agent-airgaped-images + version: dac8160deeef67d642c67065cdb584c53ca84807717f4b7abb3e748badb97313 + fingerprint: dac8160deeef67d642c67065cdb584c53ca84807717f4b7abb3e748badb97313 + sha1: sha256:56989c04162b348ce691ad78d9ceaefc4b46338df95ebe87fda1e5ce0a30d429 + packages: + - k3s-images +- name: k3s-server + version: c9072b3cee0a8f9e91d89f48f04caf9a33bf03932792d79921cec494e9a7f7d8 + fingerprint: c9072b3cee0a8f9e91d89f48f04caf9a33bf03932792d79921cec494e9a7f7d8 + sha1: sha256:a5788503bf2966365afbe2e1f35adfbeee7af9aa9dfa88ee2edf9573ca03b6c2 + packages: + - k3s + - k9s + - kubectl-k3s + - nerdctl +- name: k3s-server-airgaped-images + version: 3e8cc00744f582f54235a554c9a5a1bcbc16c8848330d8b17fbe1ab270f7d2ef + fingerprint: 3e8cc00744f582f54235a554c9a5a1bcbc16c8848330d8b17fbe1ab270f7d2ef + sha1: sha256:fbae88a6d6e06d8ac29288b73a971832e77d2483978c56481844e1c7f8e77c78 + packages: + - k3s-images +packages: +- name: k3s + version: 0dafd97bae9f8197ebc68a9997052669d58927ec3e99c6b12cd7ce6ceedea357 + fingerprint: 0dafd97bae9f8197ebc68a9997052669d58927ec3e99c6b12cd7ce6ceedea357 + sha1: sha256:e185ccf482d115c21712ccecb82e31528b4a96dd7286e723a9d5cd78971ccaad + dependencies: [] +- name: k3s-images + version: 592e0baa30c08c39736ce3a0ff21135ee889e421b3c8d20620a07f3cd38a464b + fingerprint: 592e0baa30c08c39736ce3a0ff21135ee889e421b3c8d20620a07f3cd38a464b + sha1: sha256:4ccd902fb62299669a3585da81b8216d30a7b012001dd0ef67285f1361a5e5fa + dependencies: [] +- name: k9s + version: 5950fdb3fe5cf31d54de992dd8dfdb17bc43eca03901b375c7e54ed89203966b + fingerprint: 5950fdb3fe5cf31d54de992dd8dfdb17bc43eca03901b375c7e54ed89203966b + sha1: sha256:d0ad55e5c5f85d986c15346247d9dec6f5b2712a5a81ebb8af80c9b5676c23a4 + dependencies: [] +- name: kubectl-k3s + version: 7ad3a6f1733dd6068d1f380ffff2daeaec2d7bbefdc297873854c55eec287f86 + fingerprint: 7ad3a6f1733dd6068d1f380ffff2daeaec2d7bbefdc297873854c55eec287f86 + sha1: sha256:0325c1d22e341d13c91abf7df05c31c3df8effa6da3c3d0bca3920e26edca721 + dependencies: [] +- name: nerdctl + version: 3ef7aaf0a97b5ea75f13913f2c73609b90e9fb46695d743c2acedd5d0d9e4eb4 + fingerprint: 3ef7aaf0a97b5ea75f13913f2c73609b90e9fb46695d743c2acedd5d0d9e4eb4 + sha1: sha256:beb08f27a3f548472c8c0edee96e813fba538d7e4b2229325e5262cc30aa7d30 + dependencies: [] +license: + version: cf0ca1fe65dee9607c7bb9460a3f20835e582cbb7f5b2c3625fba2e21d7e91b9 + fingerprint: cf0ca1fe65dee9607c7bb9460a3f20835e582cbb7f5b2c3625fba2e21d7e91b9 + sha1: sha256:cbe3175489dfaec91e9f392399fbfb68e008885feb91a3b8d493a35d2fc5a8fa