YAML

Kubernetes之ConfigMap

喜你入骨 提交于 2021-01-30 19:41:54
[TOC] 1、何为configMap kubernetes中提供了一个叫 configMap 的概念,为的就是让镜像和配置文件之间解耦,不需要在镜像中打包配置文件,实现了镜像的灵活性,因为一个 configMap 就是一系列配置信息的集合,将来是可以直接注入到Pod中的容器供其使用。 2、创建configMap 你可以通过使用 kubectl create configmap 或者 yaml 方式来创建configMap。 2.1、通过--from-literal创建 命令格式: $ kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] 示例: 1.创建命令 $ kubectl create configmap test-config --from-literal=Username=root --from-literal=Password=123456 2.结果如下data内容: [root@hdss7-21 ~]# kubectl get configmap test-config -o yaml apiVersion: v1 data: Password: "123456" Username: root kind: ConfigMap metadata:

kubernetes用户权限管理工具permission-manager

淺唱寂寞╮ 提交于 2021-01-30 13:51:28
Permission Manager Permission Manager是一个为Kubernetes RBAC和用户管理提供Web UI的项目,为Kubernetes权限管理提供友好的可视化界面。 安装 从 https://github.com/sighupio/permission-manager/tree/master/deployments/kubernetes 把yaml文件下载下来,如下 [root@qd01-stop-k8s-master001 kubernetes]# ll total 4 -rw-r--r-- 1 root root 2697 Jan 28 11:08 deploy.yml drwxr-xr-x 2 root root 37 Jan 28 11:14 seeds 创建namespace [root@qd01-stop-k8s-master001 kubernetes]# kubectl create namespace permission-manager namespace/permission-manager created 创建秘密并进行相应更新 [rancher@qd01-stop-k8snode011 permission-manager]$ cat secret.yaml --- apiVersion: v1 kind: Secret

Flink可靠性的基石-checkpoint机制详细解析

我怕爱的太早我们不能终老 提交于 2021-01-30 01:53:28
Checkpoint介绍 checkpoint机制是Flink可靠性的基石,可以保证Flink集群在某个算子因为某些原因(如 异常退出)出现故障时,能够将整个应用流图的状态恢复到故障之前的某一状态,保 证应用流图状态的一致性。Flink的checkpoint机制原理来自“Chandy-Lamport algorithm”算法。 每个需要checkpoint的应用在启动时,Flink的JobManager为其创建一个 CheckpointCoordinator(检查点协调器) ,CheckpointCoordinator全权负责本应用的快照制作。 1) CheckpointCoordinator(检查点协调器) 周期性的向该流应用的所有source算子发送 barrier(屏障)。 2) 当某个source算子收到一个barrier时,便暂停数据处理过程,然后将自己的当前状态制作成快照,并保存到指定的持久化存储中,最后向CheckpointCoordinator报告自己快照制作情况,同时向自身所有下游算子广播该barrier,恢复数据处理 3) 下游算子收到barrier之后,会暂停自己的数据处理过程,然后将自身的相关状态制作成快照,并保存到指定的持久化存储中,最后向CheckpointCoordinator报告自身快照情况,同时向自身所有下游算子广播该barrier,恢复数据处理。

key for name of json file (rather than just its fields) for use in Jekyll page generator?

别等时光非礼了梦想. 提交于 2021-01-29 20:11:04
问题 I'm using a data page generator for my Jekyll website to create pages based on a folder of JSON files. I want the generator to use the names of the json files as the page title, but I can't figure out the right syntax to tell it to use the file name instead of one of the fields in the json. I can access the file name in one of the layout pages with: for file in site.data.drinks file[0] But file[0] doesn't work in the config (neither does record[0] or record): - data: drinks template: drink

How to read in ALL YAML variables as strings using Python

浪尽此生 提交于 2021-01-29 18:50:26
问题 I have a YAML file where the data contains both strings and integers. When loading YAML file and producing dictionary, YAML "intelligently" makes unquoted integers as type int. Is there any easy way to have YAML treat everything as a string without putting in double quotes around all integers? Here is a portion of the YAML file: devices: rtr1: reachable: True instances: [Region-58,] system_id: 0101.8800.0008 level: Level-2 isis_lsps: - lsp_id: RTR1CA22CWP.00-00 instance: Region-58 prot

TYPO3 8 form - Define several file upload folders

自作多情 提交于 2021-01-29 15:08:37
问题 I want to define different upload folders in the TYPO3 form extension. Following the example in the manual (https://docs.typo3.org/c/typo3/cms-form/8.7/en-us/Concepts/FormFileStorages/Index.html) I tried the below configuration. In the form wizzard I can select the different folders. The two folders fileadmin/myfolder/folder1/ and fileadmin/myfolder/folder2/ exist, but in the frontend I get the error that the folder /myfolder/folder1/ does not exist. What am I doing wrong? TYPO3: CMS: Form:

How to trigger azure pipeline in one topic branch during push for another topic branch

早过忘川 提交于 2021-01-29 09:57:49
问题 My azure devops pipileine's yaml file is not in master branch of bitbucket. Its in another branch inside master branch (master/pipeline-branch). I am trying to trigger that build when there is a push to another topic branch which is also not the master branch. (master/topic/secondary). In my yaml file I have written the trigger like this. trigger: - topic/secondary But no build is triggered when I push a file to secondary branch. 回答1: you need to cherry pick\merge commits with this file to

Why is the apparently malformed yaml the one that validates?

有些话、适合烂在心里 提交于 2021-01-29 09:24:36
问题 In the first yaml below, the second podSelector clause (under to ) seems correctly formatted, with two spaces indent for matchLabels , consistent with standards and the rest of the yaml. The second yaml is identical, but matchLabels has four spaces. This format follows the Kubernetes documentation. (There are no tabs.) Yet the first yaml fails kubectl validation with error validating "p.yaml": error validating data: ValidationError(NetworkPolicy.spec.egress[0].to[0]): unknown field

50个能帮你节省时间的开发工具

北慕城南 提交于 2021-01-29 08:57:48
50个能帮你节省时间的开发工具 前端小混混 前端先锋 // 每日前端夜话 第413篇 // 正文共:3300 字 // 预计阅读时间:10 分钟 本文列举出 50 个能够帮你提高开发效率,节省开发时间的 Chrome 扩展和 Web 应用,它们很有可能会在什么时候派上用场。老规矩,先转发、点赞、点再看三连,最后再慢慢阅读,千万别让它在收藏夹里吃灰。 1. Whatruns 一个免费的浏览器扩展程序,只需单击一下按钮,就能帮你识别当前网站上所使到的技术。 官网: https://www.whatruns.com/ Whatruns 2. Sizzy 开发人员专用的浏览器。可以帮你节省时间,加快开发流程 官网: https://sizzy.co/ Sizzy 3. Log Rocket LogRocket 使你可以重播用户在你站点上所做的操作,从而帮你重现错误并更快地解决问题。 官网: https://logrocket.com/ Log Rocket 4. Sentry Sentry 的应用监视平台几乎可以为所有的开发人员提供帮助,它能够诊断、修复和优化你代码的性能。 官网: https://sentry.io/ Sentry 5. Can I Use? "Can I use"提供了最新的浏览器支持表,能帮你检查支持台式机和移动 Web 浏览器上的前端 Web 技术。 官网:

Autocompletion in YML files with Spring configuration doesn't work for map field

爱⌒轻易说出口 提交于 2021-01-29 06:45:42
问题 I'm facing some issues with autocompletion feature for yml files containing spring configuration. I found very similar question on stackoverflow but my reputation is too low to write a comment there. The solution doesn't work for me. I enabled annotation processor I'm using the newest Ultimate version of IntelliJ. I added the following dependency to my pom.xml file: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional