发布一个k8s部署视频:https://edu.csdn.net/course/detail/26967
课程内容:各种k8s部署方式。包括minikube部署,kubeadm部署,kubeasz部署,rancher部署,k3s部署。包括开发测试环境部署k8s,和生产环境部署k8s。
腾讯课堂连接地址https://ke.qq.com/course/478827?taid=4373109931462251&tuin=ba64518
第二个视频发布 https://edu.csdn.net/course/detail/27109
腾讯课堂连接地址https://ke.qq.com/course/484107?tuin=ba64518
介绍主要的k8s资源的使用配置和命令。包括configmap,pod,service,replicaset,namespace,deployment,daemonset,ingress,pv,pvc,sc,role,rolebinding,clusterrole,clusterrolebinding,secret,serviceaccount,statefulset,job,cronjob,podDisruptionbudget,podSecurityPolicy,networkPolicy,resourceQuota,limitrange,endpoint,event,conponentstatus,node,apiservice,controllerRevision等。
第三个视频发布:https://edu.csdn.net/course/detail/27574
详细介绍helm命令,学习helm chart语法,编写helm chart。深入分析各项目源码,学习编写helm插件
————————————————------------------------------------------------------------------------------------------------------------------
package com.data.struct;
public class FibHeap {
private Node min;
private int n;
public FibHeap(){
}
public FibHeap(int [] data){
for(int i=0;i<data.length;i++){
insert(data[i]);
}
}
public void insert(int key){
Node node=new Node();
node.key=key;
insert(node);
}
public void insert(Node node){
node.degree=0;
node.parent=null;
node.children=null;
node.mark=false;
if(min==null){
min=node;
min.left=min;
min.right=min;
}else{
min.right.left=node;
node.right=min.right;
min.right=node;
node.left=min;
if(node.key<min.key){
min=node;
}
}
n=n+1;
}
public FibHeap union(FibHeap fib){
FibHeap h=new FibHeap();
h.min=this.min;
h.min.right.left=fib.min.right;
fib.min.right.right=h.min.right;
fib.min.left=h.min;
h.min.right=fib.min;
if(this.min==null||fib.min!=null&&fib.min.key<h.min.key){
h.min=fib.min;
}
h.n=this.n+fib.n;
return h;
}
public Node extractMin(){
Node z=min;
if(z!=null){
if(z.children!=null){
Node c=z.children;
Node right=c.right;
this.min.right.left=c;
c.right=this.min.right;
c.left=this.min;
this.min.right=c;
c.parent=null;
c=right;
while(c.right!=z.children.right){
this.min.right.left=c;
c.right=this.min.right;
c.left=this.min;
this.min.right=c;
c.parent=null;
c=c.right;
}
}
this.min.right.left=this.min.left;
this.min.left.right=this.min.right;
if(z==z.right){
min=null;
}else{
min=z.right;
consolidate();
}
n=n-1;
}
return z;
}
private void consolidate(){
Node []a=new Node[n];
for(int i=0;i<a.length;i++){
a[i]=null;;
}
Node w=min;
Node x=w;
int d=x.degree;
Node right=w.right;
while(a[d]!=null){
Node y=a[d];
if(x.key>y.key){
Node tmp=x;
x=y;
y=tmp;
}
if(y==min){
min=min.right;
}
link(y,x);
a[d]=null;
d=d+1;
}
a[d]=x;
w=right;
while( w.right!=min.right){
Node z=w;
d=z.degree;
right=w.right;
while(a[d]!=null){
Node y=a[d];
if(z.key>y.key){
Node tmp=z;
z=y;
y=tmp;
}
if(y==min){
min=min.right;
}
link(y,z);
a[d]=null;
d=d+1;
}
a[d]=z;
w=right;
}
min=null;
for(int i=0;i<a.length;i++){
if(a[i]!=null){
if(min==null){
min=a[i];
min.right=min;
min.left=min;
}else{
min.right.left=a[i];
a[i].right=min.right;
a[i].left=min;
min.right=a[i];
if(a[i].key<min.key){
min=a[i];
}
}
}
}
}
private void link(Node y,Node x){
y.right.left=y.left;
y.left.right=y.right;
if(x.children==null){
x.children=y;
y.right=y;
y.left=y;
}else{
x.children.right.left=y;
y.right=x.children.right;
x.children.right=y;
y.left=x.children;
}
y.parent=x;
x.degree++;
y.mark=false;
}
public void decreaseKey(Node x,int k)throws Exception{
if(k>x.key){
throw new Exception("new key is grater than crurrent key");
}
x.key=k;
Node y=x.parent;
if(y!=null&&x.key<y.key){
cut(x,y);
cascadingCut(y);
}
if(x.key<min.key){
min=x;
}
}
private void cut(Node x,Node y){
x.right.left=x.left;
x.left.right=x.right;
min.right.left=x;
x.right=min.right;
x.left=min;
min.right=x;
x.parent=null;
x.mark=false;
}
private void cascadingCut(Node y){
Node z=y.parent;
if(z!=null){
if(!y.mark){
y.mark=true;
}else{
cut(y,z);
cascadingCut(z);
}
}
}
public void delete(Node x)throws Exception{
decreaseKey(x, Integer.MIN_VALUE);
extractMin();
}
public Node find(int key){
return find(min,key);
}
private Node find(Node node,int key){
if(node==null){
return null;
}
Node p=node;
if(p.key==key){
return p;
}
Node z=find(p.children,key);
if(z!=null){
return z;
}
p=p.right;
while(p!=node){
if(p.key==key){
return p;
}
z=find(p.children,key);
if(z!=null){
return z;
}
p=p.right;
}
return null;
}
public void print(){
System.out.format("F-Heap(n=%d):%n",this.n);
Node h = this.min;
while(h!=null){
this.print(0, h);
h = (h.right!=min)?h.right:null;
}
}
private void print(int level, Node node){
for (int i = 0; i < level; i++) {
System.out.format(" ");
}
System.out.format("|");
for (int i = 0; i < level; i++) {
System.out.format("-");
}
System.out.format("%d%s%n", node.key,node.mark?"(x)":"");
Node child = node.children;
while(child!=null){
print(level + 1, child);
child = (child.right!=node.children)?child.right:null;
}
}
private static class Node{
private int degree;
private Node parent;
private Node children;
private boolean mark;
private Node left;
private Node right;
private int key;
}
public static void main(String[] args)throws Exception {
/*int []data=new int[]{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
FibHeap fib=new FibHeap(data);
fib.print();
Node a=fib.find(3);
System.out.println(a.key);
fib.delete(a);
System.out.println("==============");
fib.print();*/
System.out.println("===========");
int []data2=new int[]{15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
FibHeap fib2=new FibHeap(data2);
Node a2=fib2.find(3);
fib2.delete(a2);
fib2.print();
Node a3=fib2.find(10);
fib2.delete(a3);
Node a4=fib2.find(6);
fib2.delete(a4);
fib2.print();
System.out.println("==============");
}
}