当前位置:网站首页>Argocd user management, RBAC control, script login, APP synchronization
Argocd user management, RBAC control, script login, APP synchronization
2022-07-25 06:42:00 【Dotnet cross platform】
Command line login
Reference resources :argocd Log in and log out [1]
Sign in :
echo y | argocd login argocd-server.argocd.svc.cluster.local --password '[email protected]' --username adminLog out :
argocd logout argocd-server.argocd.svc.cluster.localCreate user 、 to grant authorization
Create user
Reference resources : User management [2]
stay argocd/argocd-cm Add one gitops user , Generated apiKey and login jurisdiction .
apiVersion: v1
data:
accounts.gitops: apiKey, login
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
name: argocd-cm
namespace: argocdAfter modification , Will be hot loaded , No need to restart any services .
use admin After the user logs in , modify gitops The password for [email protected]( Be careful current-password Is the password of the currently logged in user , If you use admin Logon , Namely admin Password )
argocd account update-password \
--account gitops \
--current-password '[email protected]' \
--new-password '[email protected]'At this point, you can log in with the command line :
echo y | argocd login argocd-server.argocd.svc.cluster.local --password '[email protected]' --username gitopsThis user cannot see admin Build any resources (app、project、 Warehouse 、cluster etc. ). to gitops User generated token:( Generated in this way token Never expire , You can add --expires-in Parameter setting expiration time )
# argocd account generate-token --account gitops
xxxxThen you need login 了 , You need to specify the --server and --insecure
argocd app list --auth-token xxx --server argocd-server.argocd.svc.cluster.local --insecureBut use token The way , Every time you execute the command line, you need to add parameters , More complicated . direct login The post operation is simpler .
jurisdiction
Reference resources :Rbac Access control [3]
Resources and actions include the following :
Resources: clusters, projects, applications, repositories, certificates, accounts, gpgkeys, logs, exec Actions: get, create, update, delete, sync, override, action/<group/kind/action-name>
stay argocd-rbac-cm Configmaps Add the following policy.csv You can see that admin Created app、 Warehouse and other information :
data:
policy.csv: |
p, role:gitops, applications, get, *, allow
p, role:gitops, applications, create, *, allow
p, role:gitops, applications, update, *, allow
p, role:gitops, applications, sync, *, allow
p, role:gitops, applications, override, *, allow
p, role:gitops, repositories, get, *, allow
p, role:gitops, repositories, create, *, allow
p, role:gitops, repositories, update, *, allow
p, role:gitops, projects, create, *, allow
p, role:gitops, projects, get, *, allow
p, role:gitops, clusters, get, *, allow
p, role:gitops, clusters, list, *, allow
g, gitops, role:gitops
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: argocd-rbac-cm
app.kubernetes.io/part-of: argocd
name: argocd-rbac-cm
namespace: argocdBe careful : Must increase g, gitops, role:gitops take gitops User added gitops This role in .
Trigger synchronization sync
echo y | argocd login argocd-server.argocd.svc.cluster.local --password '[email protected]' --username gitops
argocd app sync apps-by-top-appReference material
[1]
argocd Log in and log out : https://argo-cd.readthedocs.io/en/stable/user-guide/commands/argocd_login/
[2]User management : https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/
[3]Rbac Access control : https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/
- END -
Share 、 Dianzanhe is watching
Support us to share more good articles , thank you !
Order one Looking at Cluster is always stable
边栏推荐
- Case ---- how efficient is the buffer stream compared with the ordinary input stream and output stream?
- Common mode inductance has been heard many times, but what principle do you really understand?
- js数据类型的判断——案例6精致而优雅的判断数据类型
- Machine learning keras fitting sine function
- GIS实战应用案例100篇(十七)-基于DEM制作三维地图
- Over adapter mode
- 51 timer initial value calculation
- A little consideration of strategic mode
- Restrict Su command and sudo mechanism to promote nmap and console command netstat
- C # read Beckhoff variable
猜你喜欢

Create a new STM32 project and configure it - based on registers

Software engineering in Code: regular expression ten step clearance
![[C language] program environment and preprocessing](/img/d6/d59a0d8d286ea9408043d8ad1e1348.png)
[C language] program environment and preprocessing

Do you know the same period last year in powerbi

机器人工程-教学品质-如何判定

It is said that screentogif is a GIF recording artifact, but I don't know that its strength is far from here

HTX00001_ Keil51 bug encountered in serial port parsing

Health clock in daily reminder tired? Then let automation help you -- hiflow, application connection automation assistant

Case ---- how efficient is the buffer stream compared with the ordinary input stream and output stream?

Leetcode46 Full Permutation (Introduction to backtracking)
随机推荐
In container multicast
Introduction to the usage of explain and the meaning of result field in MySQL
[C language] program environment and preprocessing
Ant design input search box listens for allowclear event separately
都说ScreenToGif是GIF录制神器,却不知其强大之处远不在此
Temperature table lookup and calculation formula
JS gets the text selected by the mouse and is in the selected state
JS array = number assignment changes by one, causing the problem of changing the original array
【愚公系列】2022年7月 Go教学课程 016-运算符之逻辑运算符和其他运算符
Keil uvisin5 code auto completion or code Association
Some interview questions collected
What are the hazards of insufficient sleep?
Robot engineering - teaching quality - how to judge
Use of golang exec.command
常吃发酵馒头是否会伤害身体
睡眠不足有哪些危害?
100 GIS practical application cases (seventeen) - making 3D map based on DEM
【datawhale202207】强化学习:策略梯度和近端策略优化
Tab bar toggle style
C#控件开源库:MetroFramework的下载