摘要: func 的基本构成元素 func (p myType ) funcName ( a, b int , c string ) ( r , s int ) { return } 其中: 关键字———func // 这个是定义函数的关键字 函数拥有者—(p myType) // 这个是此函数的拥有者,下 阅读全文
posted @ 2020-08-17 15:47 loorean 阅读(974) 评论(0) 推荐(0)
摘要: python代码规范 1.缩进4个空格,在linux系统下体现比较明显,IDE会将Tab转成4个空格,放心使用 2.行的最大长度每行代码的最长字符数不超过80个,一屏可以看完,不需要左右移动 3.空行本页的一级类或者方法之间空2行,二级类和方法之间空1行 class A(object): # 空1行 阅读全文
posted @ 2020-07-31 17:58 loorean 阅读(275) 评论(0) 推荐(0)
摘要: I want to check if two structs, slices and maps are equal. But I'm running into problems with the following code. See my comments at the relevant line 阅读全文
posted @ 2020-07-26 10:44 loorean 阅读(193) 评论(0) 推荐(0)
摘要: labels 在 K8s 中是一个很重要的概念,作为一个标识,Service、Deployments 和 Pods 之间的关联都是通过 label 来实现的。而每个节点也都拥有 label,通过设置 label 相关的策略可以使得 pods 关联到对应 label 的节点上。 nodeSelecto 阅读全文
posted @ 2020-07-24 14:22 loorean 阅读(4731) 评论(0) 推荐(0)
摘要: 一、基础 1、说明:创建数据库 1 CREATE DATABASE database-name 2、说明:删除数据库 1 drop database dbname 3、说明:备份sql server 1 2 3 4 5 创建 备份数据的 device USE master EXEC sp_addum 阅读全文
posted @ 2020-07-23 20:48 loorean 阅读(1448) 评论(0) 推荐(0)
摘要: Kubernetes中的调度策略可以大致分为两种 一种是全局的调度策略,要在启动调度器时配置,包括kubernetes调度器自带的各种predicates和priorities算法,具体可以参看上一篇文章; 另一种是运行时调度策略,包括nodeAffinity(主机亲和性),podAffinity( 阅读全文
posted @ 2020-07-23 08:34 loorean 阅读(787) 评论(0) 推荐(0)
摘要: chartmuseum支持多租户的实现,它通过一个index-cache.yaml索引文件来维护租户上传记录,类似docker镜像中的manifest文件概念。 --depth=0: Path: "/index.yaml" Repo: "" --depth=1: Path: "/myrepo/ind 阅读全文
posted @ 2020-07-20 13:12 loorean 阅读(712) 评论(0) 推荐(0)
摘要: [root@test2 ~]# kubectl get deploy NAME READY UP-TO-DATE AVAILABLE AGE myapp-deploy 2/2 2 2 23s [root@test2 ~]# kubectl get rs NAME DESIRED CURRENT RE 阅读全文
posted @ 2020-07-17 18:51 loorean 阅读(2014) 评论(0) 推荐(0)
摘要: pod声明周期(状态):pending , running, succeeded, failed, unknown 挂起(Pending):Pod 已被 Kubernetes 系统接受,但有一个或者多个容器镜像尚未创建。等待时间包括调度 Pod 的时间和通过网络下载镜像的时间,这可能需要花点时间。 阅读全文
posted @ 2020-07-15 14:45 loorean 阅读(400) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-07-06 09:19 loorean 阅读(100) 评论(0) 推荐(0)