太生气
码龄10年
关注
提问 私信
  • 博客:46,125
    46,125
    总访问量
  • 27
    原创
  • 1,650,166
    排名
  • 2
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:北京市
  • 加入CSDN时间: 2014-08-19
博客简介:

qq_19757081的博客

查看详细资料
个人成就
  • 获得8次点赞
  • 内容获得2次评论
  • 获得49次收藏
  • 代码片获得111次分享
创作历程
  • 27篇
    2022年
成就勋章
TA的专栏
  • k8s
    8篇
  • python
    19篇
兴趣领域 设置
  • Python
    python
  • 网络与通信
    网络协议
  • 运维
    linux
创作活动更多

如何做好一份技术文档?

无论你是技术大神还是初涉此领域的新手,都欢迎分享你的宝贵经验、独到见解与创新方法,为技术传播之路点亮明灯!

344人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

k8s rancher升级到2.5.5

k8s version:1.17.5rancher version:2.3.3升级到2.5.5[root@k8s-master-100-251 ~]# helm repo listNAME URL local http://127.0.0.1:8879/charts stable https://rele
原创
发布博客 2022.04.25 ·
419 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

k8s traefik2.4流量复制

安装ingress-route和traefik-serviceapiVersion: traefik.containo.us/v1alpha1kind: TraefikServicemetadata: name: app-mirrorspec: mirroring: name: nginxv1 # 发送 100% 的请求到 K8S 的 Service "v1" port: 80 mirrors: - name: nginxv2 # 然后复制
原创
发布博客 2022.04.21 ·
438 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

k8s traefik2.4灰度发布

安装两个nginx服务的pod和service安装步骤省略安装traefik-service和ingress-routeapiVersion: traefik.containo.us/v1alpha1kind: TraefikServicemetadata: name: app-wrrspec: weighted: services: - name: nginxv1 weight: 3 # 定义权重 ..
原创
发布博客 2022.04.21 ·
2453 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

k8s traefik2.4部署

安装namespaceapiVersion: v1kind: Namespacemetadata: name: kube-traefik labels: app: traefik-ingress-lbtraefik2.4引进了CRD资源安装CRDapiVersion: apiextensions.k8s.io/v1beta1kind: CustomResourceDefinitionmetadata: name: ingressroutes.traefik.c
原创
发布博客 2022.04.21 ·
411 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

k8s nginx-ingress 流量复制

配置ingressapiVersion: extensions/v1beta1kind: Ingressmetadata: annotations: field.cattle.io/creatorId: user-jg5xj field.cattle.io/ingressState: '{"YWFhLXB0bWluZC1jb20vZGVmYXVsdC9hYWEucHRtaW5kLmNvbS8vODA=":""}' field.cattle.io/publicEndpoi
原创
发布博客 2022.04.17 ·
3106 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

k8s nginx-ingress灰度测试

部署 pod1自动产生service1部署ingress1部署pod2自动产生service2部署ingress2(基于header)测试:正常访问打开pod1的nginx页面; 添加header头,打开pod2的nginx页面基于权重的基于cookie...
原创
发布博客 2022.04.14 ·
2056 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

k8s L4层负载均衡metallb BGP方式

交换机配置:bgp 65520 router-id 172.20.250.250 group k8s-cn-prod external peer k8s-cn-prod as-number 65518 peer k8s-cn-prod ebgp-max-hop 255 peer k8s-cn-prod connect-interface LoopBack0 peer 172.20.100.1 as-number 65523 peer 172.20.100.1 group k8s-cn-p
原创
发布博客 2022.04.14 ·
818 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

python实现notion导入bi

#!/usr/bin/env python#coding=utf-8import subprocessimport jsonimport osimport psycopg2import reimport sysimport psycopg2.extrasimport requestsimport threadingimport timeimport sysimport reimport copydef if_database(base_url,databaseID,tok.
原创
发布博客 2022.03.24 ·
1561 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

python判断两个列表是否一样

list1 = ['checkbox', 'account_id', 'create_by', 'relation', 'file_media', 'url', 'mul_select', 'person', 'phone', 'last_by', 'account_name', 'single_select', 'account_email', 'last_time', 'account_create_time', 'create_time', 'number']list2 = ['number',..
原创
发布博客 2022.03.24 ·
12811 阅读 ·
1 点赞 ·
0 评论 ·
29 收藏

python字典深拷贝不改变原值

import copydict1 = {}dict2 = {}dict1["name"] = "aaa"dict1["age"] = 20tmp = copy.deepcopy(dict1)dict2 = tmpdict2.pop("name")print(dict1)print(dict2)深拷贝后改变新的字典,原字典的数值不受影响
原创
发布博客 2022.03.23 ·
1983 阅读 ·
2 点赞 ·
0 评论 ·
3 收藏

python将字符串中的特殊符号替换为下划线

场景:在创建数据库表的时候一些包含特殊符号的列名无法写入,需要替换为下划线import reinput_psd = 'sjidd$jds.4)'while True: test_str = re.search(r"\W",input_psd) if test_str == None: break else: input_psd = input_psd.replace(test_str.group(),'_')print(input_psd)
原创
发布博客 2022.03.23 ·
2412 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

python实现bi导入notion

import requests,jsonimport threadingimport timeimport sysclass myThread (threading.Thread): def __init__(self, name, delay, list, base_url, databaseID, token, col_type_dict, mode, title_pageid_dict, title): threading.Thread.__init__(self).
原创
发布博客 2022.03.17 ·
617 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

python对列表分段进行for循环多线程

a=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]#指定拆分成5个列表x = len(a)//5count = 1for i in range(0,len(a),x): if count <5: print(i,i+x-1) count += 1 else: print(i,len(a)-1) break对列表进行分段操作,指定拆分成固定..
原创
发布博客 2022.03.16 ·
2736 阅读 ·
1 点赞 ·
0 评论 ·
3 收藏

python实现对notion的api调用

import requests,json#创建页面上的数据库表格def create_database(base_url,pageID,token): payload = { "properties": { "Name": { "title":{} }, "Age": { "number": {} .
原创
发布博客 2022.03.15 ·
3393 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

python更改AD用户密码

from ldap3 import Server, Connection, ALL, NTLMimport jsonimport randomimport string#生成随机密码ran_str = ''.join(random.sample(string.ascii_letters + string.digits + string.punctuation, 16))# 连接server = Server('AD服务器ip地址', get_info=ALL,use_ssl=True)c.
原创
发布博客 2022.03.10 ·
2244 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

python实现mautic的api调用

mautic的restful api认证授权支持3种方式,oauth1.0、oauth2.0、basic authentication,使用基本认证比较简单,代码如下:import requestsimport base64#获取mautic站点的资源url = "http://你的mautic网址/api/assets"test_str = '用户名:密码'encode_str = base64.encodebytes(test_str.encode('utf8'))key = en
原创
发布博客 2022.03.04 ·
345 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

python实现定期备份华为网络设备配置

auto_manage.py# -*- coding: utf-8 -*-import telnetlibimport timeimport subprocess#log_date = subprocess.check_output('date +%F', shell=True).decode('utf-8').replace('
', '')#host_path = '/script/host/'#cmd_path = '/script/config_backup/command/'
原创
发布博客 2022.03.02 ·
642 阅读 ·
1 点赞 ·
0 评论 ·
3 收藏

python实现自动更新华为网络设备密码

auto_manage.pyimport telnetlibimport timeimport subprocesslog_date = subprocess.check_output('date +%F', shell=True).decode('utf-8').replace('
', '')host_path = '/script/host/'cmd_path = '/script/change_password/command/'log_path = '/script/chan.
原创
发布博客 2022.03.02 ·
571 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

python实现每月自动获取AWS云账单到易快报平台提报销

#!/usr/bin/env python#coding=utf-8import boto3import jsonfrom decimal import Decimalimport datetimeimport dateutil.relativedeltaimport timeimport calendarimport osimport psycopg2import sysimport urllib3import subprocessdef main(): #账号0..
原创
发布博客 2022.03.02 ·
830 阅读 ·
2 点赞 ·
0 评论 ·
0 收藏

python实现每月自动获取UCLOUD云账单到易快报平台提报销

# -*- coding: utf-8 -*-from ucloud.core import excfrom ucloud.client import Clientimport requestsimport datetimeimport dateutil.relativedeltaimport calendarimport timeimport jsonimport osimport psycopg2from decimal import Decimalimport sysim.
原创
发布博客 2022.03.02 ·
333 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏
加载更多