当前位置:网站首页>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
边栏推荐
- Application of first-order complementary filtering to STM32 ADC acquisition
- Shell script realizes the scheduled backup of MySQL database on two computers
- ArgoCD 用户管理、RBAC 控制、脚本登录、App 同步
- JS gets the text selected by the mouse and is in the selected state
- JS 获取鼠标选中的文字并处于选中状态
- Introduction to the usage of explain and the meaning of result field in MySQL
- JVM tuning summary -xms -xmx -xmn -xss
- Insight into mobile application operation growth in 2022 white paper: the way to "break the situation" in the era of diminishing traffic dividends
- CRC8 CRC16 table lookup method
- Easy gene chip SEQ analysis method: practical workflow and advanced applications
猜你喜欢

R strange grammar summary

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

Insight into mobile application operation growth in 2022 white paper: the way to "break the situation" in the era of diminishing traffic dividends
![[yolov5 practice 3] traffic sign recognition system based on yolov5 - model training](/img/2f/1d2938dafa17c602c9aaf640be9bf1.png)
[yolov5 practice 3] traffic sign recognition system based on yolov5 - model training

如何学习 C 语言?

【datawhale202207】强化学习:策略梯度和近端策略优化

【C】 Program environment and pretreatment

JTAG debugging source level debugging of arm bare board debugging

Can communication test based on STM32: turn the globe

Thread 类的基本用法
随机推荐
在C# WinForms应用程序中安装,配置和使用MetroFramework
__ str__ Output class
Solve the problem of invalid modification of QT 5 interface. Solve the problem of invalid modification of qtdesigner
Application of first-order complementary filtering to STM32 ADC acquisition
Bubble sort code implementation
Addition, deletion, modification and query of DOM elements
2022深圳杯
C#--MetroFramework框架调用metroModernUI库,并在工具栏使用
What determines the "personality" of AI robots?
你了解PowerBI中的去年同期吗
Machine learning keras fitting sine function
“font/woff“ and “font/woff2“ in file “mime.types“
C control open source library: download of metroframework
Bug notes
Over adapter mode
【transformer】DeiT
不只是日志收集,项目监控工具Sentry的安装、配置、使用
R strange grammar summary
The LAF protocol elephant of defi 2.0 may be one of the few profit-making means in your bear market
[cann training camp] play with the one-stop plan of cann target detection and recognition - learning notes 1 (initial experience)