github.com/argoproj/argo-cd/v2@v2.10.9/docs/operator-manual/custom-styles.md (about) 1 # Custom Styles 2 3 Argo CD imports the majority of its UI stylesheets from the [argo-ui](https://github.com/argoproj/argo-ui) project. 4 Sometimes, it may be desired to customize certain components of the UI for branding purposes or to 5 help distinguish between multiple instances of Argo CD running in different environments. 6 7 Such custom styling can be applied either by supplying a URL to a remotely hosted CSS file, or by 8 loading a CSS file directly onto the argocd-server container. Both mechanisms are driven by modifying 9 the argocd-cm configMap. 10 11 ## Adding Styles Via Remote URL 12 13 The first method simply requires the addition of the remote URL to the argocd-cm configMap: 14 15 ### argocd-cm 16 ```yaml 17 --- 18 apiVersion: v1 19 kind: ConfigMap 20 metadata: 21 ... 22 name: argocd-cm 23 data: 24 ui.cssurl: "https://www.example.com/my-styles.css" 25 ``` 26 27 ## Adding Styles Via Volume Mounts 28 29 The second method requires mounting the CSS file directly onto the argocd-server container and then 30 providing the argocd-cm with the properly configured path to that file. In the following example, 31 the CSS file is actually defined inside of a separate configMap (the same effect could be achieved 32 by generating or downloading a CSS file in an initContainer): 33 34 ### argocd-cm 35 ```yaml 36 --- 37 apiVersion: v1 38 kind: ConfigMap 39 metadata: 40 ... 41 name: argocd-cm 42 data: 43 ui.cssurl: "./custom/my-styles.css" 44 ``` 45 46 Note that the `cssurl` should be specified relative to the "/shared/app" directory; 47 not as an absolute path. 48 49 ### argocd-styles-cm 50 ```yaml 51 --- 52 apiVersion: v1 53 kind: ConfigMap 54 metadata: 55 ... 56 name: argocd-styles-cm 57 data: 58 my-styles.css: | 59 .sidebar { 60 background: linear-gradient(to bottom, #999, #777, #333, #222, #111); 61 } 62 ``` 63 64 ### argocd-server 65 ```yaml 66 --- 67 apiVersion: apps/v1 68 kind: Deployment 69 metadata: 70 name: argocd-server 71 ... 72 spec: 73 template: 74 ... 75 spec: 76 containers: 77 - command: 78 ... 79 volumeMounts: 80 ... 81 - mountPath: /shared/app/custom 82 name: styles 83 ... 84 volumes: 85 ... 86 - configMap: 87 name: argocd-styles-cm 88 name: styles 89 ``` 90 91 Note that the CSS file should be mounted within a subdirectory of the "/shared/app" directory 92 (e.g. "/shared/app/custom"). Otherwise, the file will likely fail to be imported by the browser with an 93 "incorrect MIME type" error. The subdirectory can be changed using `server.staticassets` key of the 94 [argocd-cmd-params-cm.yaml](./argocd-cmd-params-cm.yaml) ConfigMap. 95 96 ## Developing Style Overlays 97 The styles specified in the injected CSS file should be specific to components and classes defined in [argo-ui](https://github.com/argoproj/argo-ui). 98 It is recommended to test out the styles you wish to apply first by making use of your browser's built-in developer tools. For a more full-featured 99 experience, you may wish to build a separate project using the [Argo CD UI dev server](https://webpack.js.org/configuration/dev-server/). 100 101 ## Banners 102 103 Argo CD can optionally display a banner that can be used to notify your users of upcoming maintenance and operational changes. This feature can be enabled by specifying the banner message using the `ui.bannercontent` field in the `argocd-cm` ConfigMap and Argo CD will display this message at the top of every UI page. You can optionally add a link to this message by setting `ui.bannerurl`. You can also make the banner sticky (permanent) by setting `ui.bannerpermanent` to true and change its position to "both" or "bottom" by using `ui.bannerposition: "both"`, allowing the banner to display on both the top and bottom, or `ui.bannerposition: "bottom"` to display it exclusively at the bottom. 104 105 ### argocd-cm 106 ```yaml 107 --- 108 apiVersion: v1 109 kind: ConfigMap 110 metadata: 111 ... 112 name: argocd-cm 113 data: 114 ui.bannercontent: "Banner message linked to a URL" 115 ui.bannerurl: "www.bannerlink.com" 116 ui.bannerpermanent: "true" 117 ui.bannerposition: "bottom" 118 ``` 119 120 