diff options
83 files changed, 643 insertions, 614 deletions
diff --git a/.gitlab/merge_request_templates/Security Release.md b/.gitlab/merge_request_templates/Security Release.md index 24fe44200d6..af3839a96a4 100644 --- a/.gitlab/merge_request_templates/Security Release.md +++ b/.gitlab/merge_request_templates/Security Release.md @@ -27,7 +27,7 @@ See [the general developer security release guidelines](https://gitlab.com/gitla ## Maintainer checklist - [ ] Correct milestone is applied and the title is matching across all backports -- [ ] Assigned to `@gitlab-release-tools-bot` with passing CI pipelines +- [ ] Assigned to `@gitlab-release-tools-bot` with passing CI pipelines and **when all backports including the MR targeting master are ready.** /label ~security diff --git a/app/assets/stylesheets/bootstrap_migration.scss b/app/assets/stylesheets/bootstrap_migration.scss index f3293510e9a..875de57cfcc 100644 --- a/app/assets/stylesheets/bootstrap_migration.scss +++ b/app/assets/stylesheets/bootstrap_migration.scss @@ -8,7 +8,7 @@ $brand-danger: $red-500; $border-radius-base: 3px !default; -$modal-body-bg: $white-light; +$modal-body-bg: $white; $input-border: $border-color; $padding-base-vertical: $gl-vert-padding; @@ -168,7 +168,7 @@ table { .bg-danger, .bg-warning { .card-header { - color: $white-light; + color: $white; } } @@ -310,11 +310,11 @@ pre code { .alert-info, .alert-warning, .alert-danger { - color: $white-light; + color: $white; h4, .alert-link { - color: $white-light; + color: $white; } } diff --git a/app/assets/stylesheets/components/popover.scss b/app/assets/stylesheets/components/popover.scss index 198500d07a7..fcaa1b054ed 100644 --- a/app/assets/stylesheets/components/popover.scss +++ b/app/assets/stylesheets/components/popover.scss @@ -12,7 +12,7 @@ border-color: $blue-600; .popover-body { - color: $white-light; + color: $white; } &.bs-popover-bottom { @@ -65,7 +65,7 @@ } > .popover-header::before { - border-color: $white-light; + border-color: $white; } } @@ -78,7 +78,7 @@ } .popover-header { - background-color: $white-light; + background-color: $white; font-size: $gl-font-size-small; } @@ -116,7 +116,7 @@ .accept-mr-label { background-color: $accepting-mr-label-color; - color: $white-light; + color: $white; } } diff --git a/app/assets/stylesheets/framework/awards.scss b/app/assets/stylesheets/framework/awards.scss index 7760c48cb92..0eab86ff7ea 100644 --- a/app/assets/stylesheets/framework/awards.scss +++ b/app/assets/stylesheets/framework/awards.scss @@ -17,7 +17,7 @@ z-index: 300; width: $award-emoji-width; font-size: 14px; - background-color: $white-light; + background-color: $white; border: 1px solid $border-white-light; border-radius: $border-radius-base; box-shadow: 0 6px 12px $award-emoji-menu-shadow; @@ -135,7 +135,7 @@ &:hover, &:focus, &:active { - background-color: $white-light; + background-color: $white; border-color: $border-color; box-shadow: none; } diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index f922d8bcaab..f42e500efa8 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -40,7 +40,7 @@ } &.white { - background-color: $white-light; + background-color: $white; } &.top-block { @@ -73,7 +73,7 @@ &.content-component-block { padding: 11px 0; - background-color: $white-light; + background-color: $white; } .title { @@ -96,13 +96,13 @@ } &.build-content { - background-color: $white-light; + background-color: $white; border-top: 0; } } .sub-header-block { - background-color: $white-light; + background-color: $white; border-bottom: 1px solid $white-dark; padding: 11px 0; margin-bottom: 11px; @@ -176,7 +176,7 @@ } &.groups-cover-block { - background: $white-light; + background: $white; border-bottom: 1px solid $border-color; text-align: left; padding: 24px 0; diff --git a/app/assets/stylesheets/framework/broadcast_messages.scss b/app/assets/stylesheets/framework/broadcast_messages.scss index 359f4681938..9903d10d27c 100644 --- a/app/assets/stylesheets/framework/broadcast_messages.scss +++ b/app/assets/stylesheets/framework/broadcast_messages.scss @@ -31,7 +31,7 @@ right: $gl-padding; max-width: 300px; width: auto; - background: $white-light; + background: $white; border: 1px solid $gray-200; box-shadow: 0 1px 2px 0 rgba($black, 0.1); border-radius: $border-radius-default; diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index ecbc5fa9351..38cef3de777 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -1,6 +1,6 @@ @mixin btn-comment-icon { border-radius: 50%; - background: $white-light; + background: $white; padding: 1px; font-size: 12px; color: $blue-500; @@ -12,7 +12,7 @@ &.inverted { background: $blue-500; border-color: $blue-600; - color: $white-light; + color: $white; } &:active { @@ -104,23 +104,23 @@ } @mixin btn-green { - @include btn-color($green-500, $green-600, $green-600, $green-700, $green-700, $green-800, $white-light); + @include btn-color($green-500, $green-600, $green-600, $green-700, $green-700, $green-800, $white); } @mixin btn-blue { - @include btn-color($blue-500, $blue-600, $blue-600, $blue-700, $blue-700, $blue-800, $white-light); + @include btn-color($blue-500, $blue-600, $blue-600, $blue-700, $blue-700, $blue-800, $white); } @mixin btn-orange { - @include btn-color($orange-500, $orange-600, $orange-600, $orange-700, $orange-700, $orange-800, $white-light); + @include btn-color($orange-500, $orange-600, $orange-600, $orange-700, $orange-700, $orange-800, $white); } @mixin btn-red { - @include btn-color($red-500, $red-600, $red-600, $red-700, $red-700, $red-800, $white-light); + @include btn-color($red-500, $red-600, $red-600, $red-700, $red-700, $red-800, $white); } @mixin btn-white { - @include btn-color($white-light, $border-color, $white-normal, $border-white-normal, $white-dark, $border-gray-dark, $gl-text-color); + @include btn-color($white, $border-color, $white-normal, $border-white-normal, $white-dark, $border-gray-dark, $gl-text-color); } @mixin btn-with-margin { @@ -173,21 +173,21 @@ &.btn-inverted { &.btn-success { - @include btn-outline($white-light, $green-600, $green-500, $green-100, $green-700, $green-500, $green-200, $green-600, $green-800); + @include btn-outline($white, $green-600, $green-500, $green-100, $green-700, $green-500, $green-200, $green-600, $green-800); } &.btn-remove, &.btn-danger { - @include btn-outline($white-light, $red-500, $red-500, $red-100, $red-700, $red-500, $red-200, $red-600, $red-800); + @include btn-outline($white, $red-500, $red-500, $red-100, $red-700, $red-500, $red-200, $red-600, $red-800); } &.btn-warning { - @include btn-outline($white-light, $orange-500, $orange-500, $orange-100, $orange-700, $orange-500, $orange-200, $orange-600, $orange-800); + @include btn-outline($white, $orange-500, $orange-500, $orange-100, $orange-700, $orange-500, $orange-200, $orange-600, $orange-800); } &.btn-primary, &.btn-info { - @include btn-outline($white-light, $blue-500, $blue-500, $blue-100, $blue-700, $blue-500, $blue-200, $blue-600, $blue-800); + @include btn-outline($white, $blue-500, $blue-500, $blue-100, $blue-700, $blue-500, $blue-200, $blue-600, $blue-800); } } @@ -202,11 +202,11 @@ &.btn-close, &.btn-close-color { - @include btn-outline($white-light, $orange-600, $orange-500, $orange-100, $orange-700, $orange-500, $orange-200, $orange-600, $orange-800); + @include btn-outline($white, $orange-600, $orange-500, $orange-100, $orange-700, $orange-500, $orange-200, $orange-600, $orange-800); } &.btn-spam { - @include btn-outline($white-light, $red-500, $red-500, $red-100, $red-700, $red-500, $red-200, $red-600, $red-800); + @include btn-outline($white, $red-500, $red-500, $red-100, $red-700, $red-500, $red-200, $red-600, $red-800); } &.btn-danger, @@ -249,7 +249,7 @@ padding: 6px 16px; border-color: $border-color; color: $gray-darkest; - background-color: $white-light; + background-color: $white; &:hover, &:active, @@ -409,13 +409,13 @@ cursor: default; &:active { - box-shadow: inset 0 0 0 $white-light; + box-shadow: inset 0 0 0 $white; } } .btn-inverted { &-secondary { - @include btn-outline($white-light, $blue-500, $blue-500, $blue-100, $blue-700, $blue-500, $blue-200, $blue-600, $blue-800); + @include btn-outline($white, $blue-500, $blue-500, $blue-100, $blue-700, $blue-500, $blue-200, $blue-600, $blue-800); } } diff --git a/app/assets/stylesheets/framework/calendar.scss b/app/assets/stylesheets/framework/calendar.scss index 9638fee6078..de767ac3fe0 100644 --- a/app/assets/stylesheets/framework/calendar.scss +++ b/app/assets/stylesheets/framework/calendar.scss @@ -83,7 +83,7 @@ .pika-day { border-radius: 0; - background-color: $white-light; + background-color: $white; text-align: center; } diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index 0aae2f20671..211e1e30161 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -5,7 +5,7 @@ .cgreen { color: $green-600; } .cdark { color: $common-gray-dark; } -.fwhite { fill: $white-light; } +.fwhite { fill: $white; } .fgray { fill: $gray-700; } .text-plain, @@ -207,10 +207,10 @@ li.note { padding: 10px; background: $red-400; margin: 0; - color: $white-light; + color: $white; a { - color: $white-light; + color: $white; text-decoration: underline; } } diff --git a/app/assets/stylesheets/framework/contextual_sidebar.scss b/app/assets/stylesheets/framework/contextual_sidebar.scss index 0e29b0b7dda..11064f18418 100644 --- a/app/assets/stylesheets/framework/contextual_sidebar.scss +++ b/app/assets/stylesheets/framework/contextual_sidebar.scss @@ -48,7 +48,7 @@ .avatar-container { flex: 0 0 40px; - background-color: $white-light; + background-color: $white; } .sidebar-context-title { @@ -63,7 +63,7 @@ } .settings-avatar { - background-color: $white-light; + background-color: $white; svg { fill: $gl-text-color-secondary; @@ -282,7 +282,7 @@ min-width: 150px; margin-top: -1px; padding: 4px 1px; - background-color: $white-light; + background-color: $white; box-shadow: 2px 1px 3px $dropdown-shadow-color; border: 1px solid $gray-darker; border-left: 0; diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index 1804f70b37c..a56505ee6e2 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -66,7 +66,7 @@ .dropdown-toggle, .confidential-merge-request-fork-group .dropdown-toggle { padding: 6px 8px 6px 10px; - background-color: $white-light; + background-color: $white; color: $gl-text-color; font-size: 14px; text-align: left; @@ -183,7 +183,7 @@ } .avatar { - border-color: $white-light; + border-color: $white; } } @@ -258,7 +258,7 @@ font-size: 14px; font-weight: $gl-font-weight-normal; padding: 8px 0; - background-color: $white-light; + background-color: $white; border: 1px solid $border-color; border-radius: $border-radius-base; box-shadow: 0 2px 4px $dropdown-shadow-color; @@ -1009,7 +1009,7 @@ header.header-content .dropdown-menu.frequent-items-dropdown-menu { width: 100%; position: absolute; bottom: 0; - background: linear-gradient(to top, $white-light 0, rgba($white-light, 0)); + background: linear-gradient(to top, $white 0, rgba($white, 0)); transition: opacity $fade-mask-transition-duration $fade-mask-transition-curve; content: ''; pointer-events: none; @@ -1024,7 +1024,7 @@ header.header-content .dropdown-menu.frequent-items-dropdown-menu { .labels-select-dropdown-contents { min-height: $dropdown-min-height; max-height: 330px; - background-color: $white-light; + background-color: $white; border: 1px solid $border-color; box-shadow: 0 2px 4px $dropdown-shadow-color; z-index: 2; @@ -1038,7 +1038,7 @@ header.header-content .dropdown-menu.frequent-items-dropdown-menu { top: 0; left: 0; opacity: 0.5; - background-color: $white-light; + background-color: $white; z-index: 1; } diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index 9d21b67c95e..7ee3e68ceea 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -105,7 +105,7 @@ } .file-content { - background: $white-light; + background: $white; &.image_file, &.audio, @@ -131,7 +131,7 @@ &.blob-no-preview { background: $gray-darker; - text-shadow: 0 1px 2px $white-light; + text-shadow: 0 1px 2px $white; padding: 100px 0; } @@ -227,7 +227,7 @@ padding: 10px 0; border-left: 1px solid $border-color; margin-bottom: 0; - background: $white-light; + background: $white; li { color: $logs-li-color; diff --git a/app/assets/stylesheets/framework/filters.scss b/app/assets/stylesheets/framework/filters.scss index e151fff7eb3..9a473876fa0 100644 --- a/app/assets/stylesheets/framework/filters.scss +++ b/app/assets/stylesheets/framework/filters.scss @@ -190,7 +190,7 @@ width: 100%; min-width: 0; border: 1px solid $border-color; - background-color: $white-light; + background-color: $white; border-radius: $border-radius-default 0 0 $border-radius-default; @include media-breakpoint-down(sm) { @@ -244,7 +244,7 @@ .clear-search { width: 35px; - background-color: $white-light; + background-color: $white; border: 0; outline: none; z-index: 1; @@ -361,7 +361,7 @@ .issues-details-filters { padding-top: 0; padding-bottom: 0; - background-color: $white-light; + background-color: $white; border-top: 0; } @@ -409,7 +409,7 @@ } .dropdown-label-box { - border-color: $white-light; + border-color: $white; border-style: solid; border-width: 1px; width: 17px; diff --git a/app/assets/stylesheets/framework/forms.scss b/app/assets/stylesheets/framework/forms.scss index 69ef116043a..44c8ace9040 100644 --- a/app/assets/stylesheets/framework/forms.scss +++ b/app/assets/stylesheets/framework/forms.scss @@ -9,7 +9,7 @@ input { input[type='text'].danger { background: $input-danger-bg !important; border-color: $red-400; - text-shadow: 0 1px 1px $white-light; + text-shadow: 0 1px 1px $white; } .datetime-controls { @@ -81,7 +81,7 @@ label { .form-control { height: 29px; - background: $white-light; + background: $white; font-family: $monospace-font; } diff --git a/app/assets/stylesheets/framework/gfm.scss b/app/assets/stylesheets/framework/gfm.scss index 6943bfbc3d0..fbafb22cf37 100644 --- a/app/assets/stylesheets/framework/gfm.scss +++ b/app/assets/stylesheets/framework/gfm.scss @@ -30,7 +30,7 @@ width: $chip-size; height: $chip-size; - background: $white-light; + background: $white; background-image: linear-gradient(135deg, $gray-dark 25%, transparent 0%, transparent 75%, $gray-dark 0%), linear-gradient(135deg, $gray-dark 25%, transparent 0%, transparent 75%, $gray-dark 0%); background-size: $bg-size $bg-size; diff --git a/app/assets/stylesheets/framework/gitlab_theme.scss b/app/assets/stylesheets/framework/gitlab_theme.scss index d0c3de59937..6a2f36d2509 100644 --- a/app/assets/stylesheets/framework/gitlab_theme.scss +++ b/app/assets/stylesheets/framework/gitlab_theme.scss @@ -77,7 +77,7 @@ &:focus:hover, &:focus { &.header-user-dropdown-toggle .header-user-notification-dot { - border-color: $white-light; + border-color: $white; } } @@ -152,7 +152,7 @@ &.search-active { form { - background-color: $white-light; + background-color: $white; } .search-input-wrap { @@ -216,7 +216,7 @@ body { $indigo-700, $indigo-800, $indigo-900, - $white-light + $white ); } @@ -227,7 +227,7 @@ body { $indigo-500, $indigo-700, $indigo-700, - $white-light + $white ); } @@ -238,7 +238,7 @@ body { $theme-blue-700, $theme-blue-800, $theme-blue-900, - $white-light + $white ); } @@ -249,7 +249,7 @@ body { $theme-light-blue-500, $theme-light-blue-700, $theme-light-blue-700, - $white-light + $white ); } @@ -260,7 +260,7 @@ body { $theme-green-700, $theme-green-800, $theme-green-900, - $white-light + $white ); } @@ -271,7 +271,7 @@ body { $theme-green-500, $theme-light-green-700, $theme-light-green-700, - $white-light + $white ); } @@ -282,7 +282,7 @@ body { $theme-red-700, $theme-red-800, $theme-red-900, - $white-light + $white ); } @@ -293,7 +293,7 @@ body { $theme-light-red-500, $theme-light-red-700, $theme-light-red-700, - $white-light + $white ); } @@ -304,7 +304,7 @@ body { $gray-700, $gray-800, $gray-900, - $white-light + $white ); } @@ -338,7 +338,7 @@ body { &.active > a, &.active > a:hover, &.active > button { - color: $white-light; + color: $white; } } } @@ -354,11 +354,11 @@ body { .search { form { - background-color: $white-light; + background-color: $white; box-shadow: inset 0 0 0 1px $border-color; &:hover { - background-color: $white-light; + background-color: $white; box-shadow: inset 0 0 0 1px $blue-200; } } diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss index 0e507fd0988..3792e6cb0a6 100644 --- a/app/assets/stylesheets/framework/header.scss +++ b/app/assets/stylesheets/framework/header.scss @@ -18,7 +18,7 @@ width: 55px; height: 14px; margin: 0; - fill: $white-light; + fill: $white; } } @@ -95,7 +95,7 @@ .dropdown.open { > a { - border-bottom-color: $white-light; + border-bottom-color: $white; } } @@ -209,10 +209,10 @@ text-decoration: none; outline: 0; opacity: 1; - color: $white-light; + color: $white; &.header-user-dropdown-toggle .header-user-avatar { - border-color: $white-light; + border-color: $white; } } } @@ -224,14 +224,14 @@ .impersonated-user, .impersonated-user:hover { margin-right: 1px; - background-color: $white-light; + background-color: $white; border-top-right-radius: 0; border-bottom-right-radius: 0; } .impersonation-btn, .impersonation-btn:hover { - background-color: $white-light; + background-color: $white; border-top-left-radius: 0; border-bottom-left-radius: 0; @@ -264,7 +264,7 @@ &:focus { text-decoration: none; outline: 0; - color: $white-light; + color: $white; } } @@ -441,7 +441,7 @@ margin: 4px 0 4px 2px; &:hover { - background-color: $white-light; + background-color: $white; } } @@ -452,7 +452,7 @@ font-weight: $gl-font-weight-normal; margin-left: -6px; font-size: 11px; - color: $white-light; + color: $white; padding: 0 5px; line-height: 12px; border-radius: 7px; @@ -583,7 +583,7 @@ .navbar-empty { justify-content: center; height: $header-height; - background: $white-light; + background: $white; border-bottom: 1px solid $white-normal; .tanuki-logo, diff --git a/app/assets/stylesheets/framework/issue_box.scss b/app/assets/stylesheets/framework/issue_box.scss index 1a38f3ccce4..385b29f8bbe 100644 --- a/app/assets/stylesheets/framework/issue_box.scss +++ b/app/assets/stylesheets/framework/issue_box.scss @@ -20,7 +20,7 @@ display: block; float: left; margin-right: $gl-padding-8; - color: $white-light; + color: $white; font-size: $gl-font-size; line-height: $gl-line-height-24; diff --git a/app/assets/stylesheets/framework/job_log.scss b/app/assets/stylesheets/framework/job_log.scss index fefc51bf1f7..1a26c0283e5 100644 --- a/app/assets/stylesheets/framework/job_log.scss +++ b/app/assets/stylesheets/framework/job_log.scss @@ -34,7 +34,7 @@ .collapsible-line { &:hover { - background-color: rgba($white-light, 0.2); + background-color: rgba($white, 0.2); } .arrow { diff --git a/app/assets/stylesheets/framework/layout.scss b/app/assets/stylesheets/framework/layout.scss index 8038a367fb9..cac3695e1a1 100644 --- a/app/assets/stylesheets/framework/layout.scss +++ b/app/assets/stylesheets/framework/layout.scss @@ -12,7 +12,7 @@ body { text-decoration-skip: ink; // scss-lint:enable PropertySpelling &.navless { - background-color: $white-light !important; + background-color: $white !important; } &.board-card-content { diff --git a/app/assets/stylesheets/framework/markdown_area.scss b/app/assets/stylesheets/framework/markdown_area.scss index 0bf911eec0a..97698fefbee 100644 --- a/app/assets/stylesheets/framework/markdown_area.scss +++ b/app/assets/stylesheets/framework/markdown_area.scss @@ -122,7 +122,7 @@ .markdown-area { border-radius: 0; - background: $white-light; + background: $white; border: 1px solid $gray-100; min-height: 140px; max-height: 500px; diff --git a/app/assets/stylesheets/framework/memory_graph.scss b/app/assets/stylesheets/framework/memory_graph.scss index 06e1ebe41be..b0bfc4f47ff 100644 --- a/app/assets/stylesheets/framework/memory_graph.scss +++ b/app/assets/stylesheets/framework/memory_graph.scss @@ -1,4 +1,4 @@ .memory-graph-container { - background: $white-light; + background: $white; border: 1px solid $gray-200; } diff --git a/app/assets/stylesheets/framework/mixins.scss b/app/assets/stylesheets/framework/mixins.scss index 621a4eddc34..76b12b2405f 100644 --- a/app/assets/stylesheets/framework/mixins.scss +++ b/app/assets/stylesheets/framework/mixins.scss @@ -302,7 +302,7 @@ margin: auto auto 12px; border-radius: 50%; animation: blinking-dot 1s linear infinite; - background: $white-light; + background: $white; &:nth-child(2) { animation-delay: 0.33s; @@ -393,7 +393,7 @@ @mixin avatar-counter($border-radius: 1em) { background-color: $gray-darkest; - color: $white-light; + color: $white; border: 1px solid $gray-normal; border-radius: $border-radius; font-family: $regular-font; diff --git a/app/assets/stylesheets/framework/secondary_navigation_elements.scss b/app/assets/stylesheets/framework/secondary_navigation_elements.scss index 7e15e5c8bfd..d4ee59790e9 100644 --- a/app/assets/stylesheets/framework/secondary_navigation_elements.scss +++ b/app/assets/stylesheets/framework/secondary_navigation_elements.scss @@ -305,7 +305,7 @@ .inner-page-scroll-tabs { .fade-right { - @include fade(left, $white-light); + @include fade(left, $white); right: 0; text-align: right; @@ -315,7 +315,7 @@ } .fade-left { - @include fade(right, $white-light); + @include fade(right, $white); left: 0; text-align: left; @@ -345,7 +345,7 @@ @include scrolling-links(); .fade-right { - @include fade(left, $white-light); + @include fade(left, $white); right: -5px; .fa { @@ -354,7 +354,7 @@ } .fade-left { - @include fade(right, $white-light); + @include fade(right, $white); left: -5px; .fa { diff --git a/app/assets/stylesheets/framework/selects.scss b/app/assets/stylesheets/framework/selects.scss index a8244219b10..3c428cc352f 100644 --- a/app/assets/stylesheets/framework/selects.scss +++ b/app/assets/stylesheets/framework/selects.scss @@ -11,7 +11,7 @@ .select2-container, .select2-container.select2-drop-above { .select2-choice { - background: $white-light; + background: $white; border-color: $input-border; height: 34px; padding: $gl-vert-padding $gl-input-padding; @@ -166,7 +166,7 @@ input { padding: $grid-size; - background: $white-light image-url('select2.png'); + background: $white image-url('select2.png'); background-clip: content-box; background-origin: content-box; background-repeat: no-repeat; @@ -181,7 +181,7 @@ } &.select2-active { - background-color: $white-light; + background-color: $white; background-image: image-url('select2-spinner.gif') !important; background-origin: content-box; background-repeat: no-repeat; diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss index 36f8bdbe611..ddda2de38cb 100644 --- a/app/assets/stylesheets/framework/sidebar.scss +++ b/app/assets/stylesheets/framework/sidebar.scss @@ -23,7 +23,7 @@ &:hover, &:focus { - color: $white-light; + color: $white; text-decoration: none; } } diff --git a/app/assets/stylesheets/framework/stacked_progress_bar.scss b/app/assets/stylesheets/framework/stacked_progress_bar.scss index 2255d3be75b..0a57a74eafc 100644 --- a/app/assets/stylesheets/framework/stacked_progress_bar.scss +++ b/app/assets/stylesheets/framework/stacked_progress_bar.scss @@ -14,7 +14,7 @@ padding: 0 5px; font-size: $tooltip-font-size; font-weight: normal; - color: $white-light; + color: $white; line-height: 16px; &:hover { diff --git a/app/assets/stylesheets/framework/tables.scss b/app/assets/stylesheets/framework/tables.scss index ba406bac50b..514bd090e28 100644 --- a/app/assets/stylesheets/framework/tables.scss +++ b/app/assets/stylesheets/framework/tables.scss @@ -15,11 +15,11 @@ table { .warning, .danger, .info { - color: $white-light; + color: $white; a:not(.btn) { text-decoration: underline; - color: $white-light; + color: $white; } } @@ -53,7 +53,7 @@ table { .thead-white { th { - background-color: $white-light; + background-color: $white; color: $gl-text-color-secondary; border-top: 0; } diff --git a/app/assets/stylesheets/framework/tabs.scss b/app/assets/stylesheets/framework/tabs.scss index 6b60149fbbb..ad83fc03e71 100644 --- a/app/assets/stylesheets/framework/tabs.scss +++ b/app/assets/stylesheets/framework/tabs.scss @@ -11,7 +11,7 @@ } &.active { - background: $white-light; + background: $white; } a { diff --git a/app/assets/stylesheets/framework/timeline.scss b/app/assets/stylesheets/framework/timeline.scss index 42a739e88f7..ff6ac87db76 100644 --- a/app/assets/stylesheets/framework/timeline.scss +++ b/app/assets/stylesheets/framework/timeline.scss @@ -27,7 +27,7 @@ .timeline-entry { color: $gl-text-color; - background-color: $white-light; + background-color: $white; .timeline-entry-inner { position: relative; diff --git a/app/assets/stylesheets/framework/toggle.scss b/app/assets/stylesheets/framework/toggle.scss index 5f8ac3b7e37..8b131f59cfc 100644 --- a/app/assets/stylesheets/framework/toggle.scss +++ b/app/assets/stylesheets/framework/toggle.scss @@ -76,7 +76,7 @@ .loading-icon { display: none; font-size: 12px; - color: $white-light; + color: $white; position: absolute; top: 50%; left: 50%; diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index d61a32d2d95..b2bbc09664c 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -178,7 +178,7 @@ overflow-x: auto; tbody { - background-color: $white-light; + background-color: $white; td { border-color: $gray-200; diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index 86b65ea34f3..b4ed6587fca 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -81,7 +81,7 @@ $darken-dark-factor: 10%; $darken-border-factor: 5%; $darken-border-dashed-factor: 25%; -$white-light: #fff; +$white: #fff; $white-normal: #f0f0f0; $white-dark: #eaeaea; $white-transparent: rgba(255, 255, 255, 0.8); @@ -323,7 +323,7 @@ $theme-light-red-500: #c24b38; $theme-light-red-600: #b03927; $theme-light-red-700: #a62e21; -$border-white-light: darken($white-light, $darken-border-factor); +$border-white-light: darken($white, $darken-border-factor); $border-white-normal: darken($white-normal, $darken-border-factor); $border-gray-light: darken($gray-light, $darken-border-factor); @@ -824,7 +824,7 @@ $perf-bar-production: #222; $perf-bar-staging: #291430; $perf-bar-development: #4c1210; $perf-bar-bucket-bg: #111; -$perf-bar-bucket-box-shadow-from: rgba($white-light, 0.2); +$perf-bar-bucket-box-shadow-from: rgba($white, 0.2); $perf-bar-bucket-box-shadow-to: rgba($black, 0.25); $perf-bar-canary-text: $orange-400; diff --git a/app/assets/stylesheets/framework/zen.scss b/app/assets/stylesheets/framework/zen.scss index a4fbd9c073f..dd5b99be57e 100644 --- a/app/assets/stylesheets/framework/zen.scss +++ b/app/assets/stylesheets/framework/zen.scss @@ -1,6 +1,6 @@ .zen-backdrop { &.fullscreen { - background-color: $white-light; + background-color: $white; position: fixed; top: 0; bottom: 0; diff --git a/app/assets/stylesheets/highlight/themes/none.scss b/app/assets/stylesheets/highlight/themes/none.scss index c8ac3aa8305..2fc5d7f7a85 100644 --- a/app/assets/stylesheets/highlight/themes/none.scss +++ b/app/assets/stylesheets/highlight/themes/none.scss @@ -30,7 +30,7 @@ &, pre.code, .line_holder .line_content { - background-color: $white-light; + background-color: $white; color: $gl-text-color; } @@ -84,7 +84,7 @@ } &.hll:not(.empty-cell) { - background-color: $white-light; + background-color: $white; border-color: $white-normal; } } @@ -160,25 +160,25 @@ text-decoration: underline; } - .hll { background-color: $white-light; } + .hll { background-color: $white; } .gd { color: $gl-text-color; - background-color: $white-light; + background-color: $white; .x { color: $gl-text-color; - background-color: $white-light; + background-color: $white; } } .gi { color: $gl-text-color; - background-color: $white-light; + background-color: $white; .x { color: $gl-text-color; - background-color: $white-light; + background-color: $white; } } diff --git a/app/assets/stylesheets/highlight/white_base.scss b/app/assets/stylesheets/highlight/white_base.scss index d82a0794d29..3e126a52c4b 100644 --- a/app/assets/stylesheets/highlight/white_base.scss +++ b/app/assets/stylesheets/highlight/white_base.scss @@ -97,7 +97,7 @@ pre.code, &, pre.code, .line_holder .line_content { - background-color: $white-light; + background-color: $white; color: $white-code-color; } diff --git a/app/assets/stylesheets/mailers/highlighted_diff_email.scss b/app/assets/stylesheets/mailers/highlighted_diff_email.scss index 58c83ac7915..d8bb021e1f5 100644 --- a/app/assets/stylesheets/mailers/highlighted_diff_email.scss +++ b/app/assets/stylesheets/mailers/highlighted_diff_email.scss @@ -75,7 +75,7 @@ $highlighted-gc: #999; $highlighted-gc-bg: #eaf2f5; .code { - background-color: $white-light; + background-color: $white; font-family: monospace; font-size: $code-font-size; -premailer-cellpadding: 0; diff --git a/app/assets/stylesheets/notify.scss b/app/assets/stylesheets/notify.scss index b59b01f4086..2bf823993d7 100644 --- a/app/assets/stylesheets/notify.scss +++ b/app/assets/stylesheets/notify.scss @@ -32,7 +32,7 @@ pre.commit-message { } .gl-label-text-light { - color: $white-light; + color: $white; } .gl-label-text-dark { diff --git a/app/assets/stylesheets/page_bundles/_ide_monaco_overrides.scss b/app/assets/stylesheets/page_bundles/_ide_monaco_overrides.scss index c47901dc177..1aa112e0957 100644 --- a/app/assets/stylesheets/page_bundles/_ide_monaco_overrides.scss +++ b/app/assets/stylesheets/page_bundles/_ide_monaco_overrides.scss @@ -80,7 +80,7 @@ } .diffOverview { - background-color: $white-light; + background-color: $white; border-left: 1px solid $white-dark; cursor: ns-resize; } @@ -112,7 +112,7 @@ } .margin { - background-color: $white-light; + background-color: $white; border-right: 1px solid $gray-100; .line-insert { diff --git a/app/assets/stylesheets/page_bundles/ide.scss b/app/assets/stylesheets/page_bundles/ide.scss index c37f75d1533..0daf81628d3 100644 --- a/app/assets/stylesheets/page_bundles/ide.scss +++ b/app/assets/stylesheets/page_bundles/ide.scss @@ -84,8 +84,8 @@ $ide-commit-header-height: 48px; border-bottom: 1px solid $white-dark; &.active { - background-color: $white-light; - border-bottom-color: $white-light; + background-color: $white; + border-bottom-color: $white; } &:not(.disabled) { @@ -138,7 +138,7 @@ $ide-commit-header-height: 48px; &:not([disabled]):focus { background-color: $blue-500; - color: $white-light; + color: $white; outline: 0; svg { @@ -205,7 +205,7 @@ $ide-commit-header-height: 48px; .ide-status-bar { border-top: 1px solid $white-dark; padding: 2px $gl-padding-8 0; - background: $white-light; + background: $white; display: flex; justify-content: space-between; height: $ide-statusbar-height; @@ -306,7 +306,7 @@ $ide-commit-header-height: 48px; display: flex; flex: 1; flex-direction: column; - background-color: $white-light; + background-color: $white; border-left: 1px solid $white-dark; border-top: 1px solid $white-dark; border-top-left-radius: $border-radius-small; @@ -418,7 +418,7 @@ $ide-commit-header-height: 48px; .multi-file-commit-form { position: relative; - background-color: $white-light; + background-color: $white; border-left: 1px solid $white-dark; transition: all 0.3s ease; @@ -575,7 +575,7 @@ $ide-commit-header-height: 48px; // extend width over border of sidebar section width: calc(100% + 1px); padding-right: $gl-padding + 1px; - background-color: $white-light; + background-color: $white; border-top-color: $white-dark; border-bottom-color: $white-dark; @@ -586,7 +586,7 @@ $ide-commit-header-height: 48px; top: 0; bottom: 0; width: 1px; - background: $white-light; + background: $white; } &.is-right { @@ -609,7 +609,7 @@ $ide-commit-header-height: 48px; .ide-commit-message-field { height: 200px; - background-color: $white-light; + background-color: $white; .md-area { display: flex; @@ -819,7 +819,7 @@ $ide-commit-header-height: 48px; bottom: 0; right: 0; z-index: 10; - background: $white-light; + background: $white; overflow: auto; display: flex; flex-direction: column; @@ -889,7 +889,7 @@ $ide-commit-header-height: 48px; .multi-file-commit-panel-inner { width: 350px; padding: $grid-size $gl-padding; - background-color: $white-light; + background-color: $white; border-left: 1px solid $white-dark; } diff --git a/app/assets/stylesheets/page_bundles/xterm.scss b/app/assets/stylesheets/page_bundles/xterm.scss index de3f2a1177d..43d8b7ba5ac 100644 --- a/app/assets/stylesheets/page_bundles/xterm.scss +++ b/app/assets/stylesheets/page_bundles/xterm.scss @@ -39,7 +39,7 @@ $xterm-fg-12: #00f; $xterm-fg-13: #f0f; $xterm-fg-14: #0ff; - $xterm-fg-15: $white-light; + $xterm-fg-15: $white; $xterm-fg-16: $black; $xterm-fg-17: #00005f; $xterm-fg-18: #000087; @@ -255,7 +255,7 @@ $xterm-fg-228: #ffff87; $xterm-fg-229: #ffffaf; $xterm-fg-230: #ffffd7; - $xterm-fg-231: $white-light; + $xterm-fg-231: $white; $xterm-fg-232: #080808; $xterm-fg-233: #121212; $xterm-fg-234: #1c1c1c; @@ -490,7 +490,7 @@ } .xterm-fg-15 { - color: $white-light; + color: $white; } .xterm-fg-16 { diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss index a9079f036ab..78d4383ce28 100644 --- a/app/assets/stylesheets/pages/boards.scss +++ b/app/assets/stylesheets/pages/boards.scss @@ -211,7 +211,7 @@ .board-blank-state, .board-promotion-state { - background-color: $white-light; + background-color: $white; flex: 1; overflow-y: auto; overflow-x: hidden; @@ -245,7 +245,7 @@ } .board-card { - background: $white-light; + background: $white; border: 1px solid $gray-200; box-shadow: 0 1px 2px $issue-boards-card-shadow; line-height: $gl-padding; @@ -426,7 +426,7 @@ max-width: 1100px; min-height: 500px; padding: 25px 15px 0; - background-color: $white-light; + background-color: $white; box-shadow: 0 2px 12px rgba($black, 0.5); .empty-state { @@ -501,7 +501,7 @@ top: -3px; width: 17px; background-color: $blue-500; - color: $white-light; + color: $white; border: 1px solid $blue-600; font-size: 9px; line-height: 15px; diff --git a/app/assets/stylesheets/pages/builds.scss b/app/assets/stylesheets/pages/builds.scss index 2ddab6c3065..f8b8a7271ce 100644 --- a/app/assets/stylesheets/pages/builds.scss +++ b/app/assets/stylesheets/pages/builds.scss @@ -253,7 +253,7 @@ color: $blue-500; &:hover { - color: $white-light; + color: $white; } } } @@ -267,7 +267,7 @@ } .builds-container { - background-color: $white-light; + background-color: $white; border-top: 1px solid $border-color; border-bottom: 1px solid $border-color; max-height: 300px; diff --git a/app/assets/stylesheets/pages/clusters.scss b/app/assets/stylesheets/pages/clusters.scss index b9d415ae237..5a69aa15303 100644 --- a/app/assets/stylesheets/pages/clusters.scss +++ b/app/assets/stylesheets/pages/clusters.scss @@ -1,6 +1,6 @@ .edit-cluster-form { .clipboard-addon { - background-color: $white-light; + background-color: $white; } } @@ -35,11 +35,11 @@ } .cluster-application-logo { - border: 3px solid $white-light; + border: 3px solid $white; box-shadow: 0 0 0 1px $gray-normal; &.avatar:hover { - border-color: $white-light; + border-color: $white; } } diff --git a/app/assets/stylesheets/pages/commits.scss b/app/assets/stylesheets/pages/commits.scss index 781b6c09458..1a07600769c 100644 --- a/app/assets/stylesheets/pages/commits.scss +++ b/app/assets/stylesheets/pages/commits.scss @@ -88,7 +88,7 @@ font-family: inherit; left: $left; height: 100%; - border-right: 1px solid mix($input-border, $white-light); + border-right: 1px solid mix($input-border, $white); position: absolute; z-index: 1; } @@ -127,7 +127,7 @@ .text-expander { display: inline-flex; - background: $white-light; + background: $white; color: $gl-text-color-secondary; padding: 1px $gl-padding-4; cursor: pointer; @@ -260,7 +260,7 @@ color: $gl-text-color; &.autodevops-badge { - color: $white-light; + color: $white; } } diff --git a/app/assets/stylesheets/pages/dev_ops_score.scss b/app/assets/stylesheets/pages/dev_ops_score.scss index 6b6dce43dba..b9ee905f4b6 100644 --- a/app/assets/stylesheets/pages/dev_ops_score.scss +++ b/app/assets/stylesheets/pages/dev_ops_score.scss @@ -199,7 +199,7 @@ $space-between-cards: 8px; flex-direction: column; align-items: center; border: solid 1px $border-color; - background: $white-light; + background: $white; transform: translate(-50%, -50%); color: $gl-text-color-secondary; fill: $gl-text-color-secondary; diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss index 0c043e4f3fb..ddd1a373e2a 100644 --- a/app/assets/stylesheets/pages/diff.scss +++ b/app/assets/stylesheets/pages/diff.scss @@ -30,7 +30,7 @@ left: -11px; width: 10px; height: calc(100% + 1px); - background: $white-light; + background: $white; pointer-events: none; } @@ -92,7 +92,7 @@ } .diff-content { - background: $white-light; + background: $white; color: $gl-text-color; border-radius: 0 0 3px 3px; @@ -133,11 +133,11 @@ .frame { display: inline-block; - background-color: $white-light; + background-color: $white; line-height: 0; img { - border: 1px solid $white-light; + border: 1px solid $white; background-image: linear-gradient(45deg, $border-color 25%, transparent 25%, @@ -692,7 +692,7 @@ table.code { position: absolute; left: 0; margin-right: 0; - border-color: $white-light; + border-color: $white; cursor: pointer; transition: all 0.1s ease-out; @include code-icon-size(); @@ -742,7 +742,7 @@ table.code { .collapse-icon, path { - fill: $white-light; + fill: $white; } &:focus { @@ -760,7 +760,7 @@ table.code { @include media-breakpoint-up(sm) { margin-left: -$gl-padding; padding-left: $gl-padding; - background-color: $white-light; + background-color: $white; } } @@ -768,7 +768,7 @@ table.code { position: -webkit-sticky; position: sticky; top: $header-height; - background-color: $white-light; + background-color: $white; z-index: 200; .with-performance-bar & { @@ -872,27 +872,27 @@ table.code { display: block; width: 100%; height: 10px; - background-color: $white-light; + background-color: $white; background-image: linear-gradient(45deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, - $white-light 80%), + $white 80%), linear-gradient(225deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, - $white-light 80%), + $white 80%), linear-gradient(135deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, - $white-light 80%), + $white 80%), linear-gradient(-45deg, transparent, transparent 73%, $diff-jagged-border-gradient-color 75%, - $white-light 80%); + $white 80%); background-position: 5px 5px, 0 5px, 0 5px, 5px 5px; background-size: 10px 10px; background-repeat: repeat; @@ -981,8 +981,8 @@ table.code { .notes > .badge.badge-pill { position: absolute; background-color: $blue-400; - color: $white-light; - border: $white-light 1px solid; + color: $white; + border: $white 1px solid; min-height: $gl-padding; padding: 5px 8px; border-radius: 12px; @@ -1037,7 +1037,7 @@ table.code { } &.collapsed { - background-color: $white-light; + background-color: $white; .diff-notes-collapse, .note, diff --git a/app/assets/stylesheets/pages/environments.scss b/app/assets/stylesheets/pages/environments.scss index 1c9bfe962f6..ab6716903c7 100644 --- a/app/assets/stylesheets/pages/environments.scss +++ b/app/assets/stylesheets/pages/environments.scss @@ -112,13 +112,13 @@ .rect-text-metric { - fill: $white-light; + fill: $white; stroke-width: 1; stroke: $gray-darkest; } .rect-axis-text { - fill: $white-light; + fill: $white; } .text-metric { diff --git a/app/assets/stylesheets/pages/experimental_separate_sign_up.scss b/app/assets/stylesheets/pages/experimental_separate_sign_up.scss index 710d89d9341..dfc56654229 100644 --- a/app/assets/stylesheets/pages/experimental_separate_sign_up.scss +++ b/app/assets/stylesheets/pages/experimental_separate_sign_up.scss @@ -8,7 +8,7 @@ } .signup-box { - background-color: $white-light; + background-color: $white; box-shadow: 0 0 0 1px $border-color; border-radius: $border-radius; } @@ -16,7 +16,7 @@ .form-control { &:active, &:focus { - background-color: $white-light; + background-color: $white; } } diff --git a/app/assets/stylesheets/pages/graph.scss b/app/assets/stylesheets/pages/graph.scss index a8de8303a19..f9beb6fe037 100644 --- a/app/assets/stylesheets/pages/graph.scss +++ b/app/assets/stylesheets/pages/graph.scss @@ -10,7 +10,7 @@ } .network-graph { - background: $white-light; + background: $white; height: 500px; overflow-y: scroll; overflow-x: hidden; diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss index f6edf86e96e..beb0ea27de0 100644 --- a/app/assets/stylesheets/pages/groups.scss +++ b/app/assets/stylesheets/pages/groups.scss @@ -374,7 +374,7 @@ table.pipeline-project-metrics tr td { } &:last-child::before { - background: $white-light; + background: $white; height: auto; top: 30px; bottom: 0; diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 6de4dbfa8e5..d61fbae81f2 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -137,7 +137,7 @@ position: absolute; bottom: 0; right: 0; - text-shadow: -1px -1px 0 $white-light, 1px -1px 0 $white-light, -1px 1px 0 $white-light, 1px 1px 0 $white-light; + text-shadow: -1px -1px 0 $white, 1px -1px 0 $white, -1px 1px 0 $white, 1px 1px 0 $white; } } @@ -914,7 +914,7 @@ } .time-tracking-help-state { - background: $white-light; + background: $white; margin: 16px -20px -20px; padding: 16px 20px; border-top: 1px solid $border-gray-light; diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index d77b30ce259..e74b420f9e9 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -5,7 +5,7 @@ padding: $gl-padding-8; .issue { - background-color: $white-light; + background-color: $white; margin-bottom: $gl-padding-8; border-radius: $border-radius-default; border: 1px solid $gray-100; @@ -160,7 +160,7 @@ ul.related-merge-requests > li { margin-bottom: 10px; .form-control { - background-color: $white-light; + background-color: $white; } .btn { diff --git a/app/assets/stylesheets/pages/labels.scss b/app/assets/stylesheets/pages/labels.scss index 095e881c50a..7f6542261b8 100644 --- a/app/assets/stylesheets/pages/labels.scss +++ b/app/assets/stylesheets/pages/labels.scss @@ -65,14 +65,14 @@ padding: 0 $grid-size; line-height: 16px; border-radius: $label-border-radius; - color: $white-light; + color: $white; } .dropdown-labels-error { padding: 5px 10px; margin-bottom: 10px; background-color: $red-500; - color: $white-light; + color: $white; } .manage-labels-list { @@ -80,7 +80,7 @@ margin-bottom: 0; > li:not(.empty-message):not(.no-border) { - background-color: $white-light; + background-color: $white; margin-bottom: 5px; display: flex; justify-content: space-between; diff --git a/app/assets/stylesheets/pages/login.scss b/app/assets/stylesheets/pages/login.scss index 7488a5b16a2..67a8f689e9d 100644 --- a/app/assets/stylesheets/pages/login.scss +++ b/app/assets/stylesheets/pages/login.scss @@ -175,7 +175,7 @@ .form-control { &:active, &:focus { - background-color: $white-light; + background-color: $white; } } @@ -236,7 +236,7 @@ left: 0; right: 0; height: 40px; - background: $white-light; + background: $white; } .login-page-broadcast { diff --git a/app/assets/stylesheets/pages/merge_conflicts.scss b/app/assets/stylesheets/pages/merge_conflicts.scss index 278a9014458..9d583dcaa52 100644 --- a/app/assets/stylesheets/pages/merge_conflicts.scss +++ b/app/assets/stylesheets/pages/merge_conflicts.scss @@ -240,14 +240,14 @@ $colors: ( right: 10px; padding: 0; outline: none; - color: $white-light; + color: $white; width: 75px; // static width to make 2 buttons have same width height: 19px; } } .btn-success .fa-spinner { - color: $white-light; + color: $white; } .editor-wrap { diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index ad8b251d3e4..1e5e6da4e6c 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -714,7 +714,7 @@ $mr-widget-min-height: 69px; .table-holder { .ci-table { th { - background-color: $white-light; + background-color: $white; color: $gl-text-color-secondary; } } @@ -729,7 +729,7 @@ $mr-widget-min-height: 69px; .mr-version-controls { position: relative; z-index: 203; - background: $white-light; + background: $white; color: $gl-text-color; margin-top: -1px; @@ -806,7 +806,7 @@ $mr-widget-min-height: 69px; .epic-tabs-holder { top: $header-height; z-index: 250; - background-color: $white-light; + background-color: $white; border-bottom: 1px solid $border-color; @include media-breakpoint-up(sm) { @@ -857,7 +857,7 @@ $mr-widget-min-height: 69px; margin-right: auto; .inner-page-scroll-tabs { - background-color: $white-light; + background-color: $white; margin-left: -$gl-padding; padding-left: $gl-padding; } diff --git a/app/assets/stylesheets/pages/milestone.scss b/app/assets/stylesheets/pages/milestone.scss index cd1154b88a5..fa10ab022dc 100644 --- a/app/assets/stylesheets/pages/milestone.scss +++ b/app/assets/stylesheets/pages/milestone.scss @@ -14,7 +14,7 @@ $status-box-line-height: 26px; border: 0; padding: $gl-padding-top $gl-padding; border-radius: $border-radius-default; - background-color: $white-light; + background-color: $white; &:not(:last-child) { margin-bottom: $gl-padding-4; @@ -238,7 +238,7 @@ $status-box-line-height: 26px; } .issuable-row { - background-color: $white-light; + background-color: $white; } .milestone-popover-instructions-list { diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss index c6bac33e888..43c7c03fa58 100644 --- a/app/assets/stylesheets/pages/note_form.scss +++ b/app/assets/stylesheets/pages/note_form.scss @@ -59,7 +59,7 @@ border-radius: $border-radius-base; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; - background-color: $white-light; + background-color: $white; &.is-focused { @extend .form-control:focus; @@ -173,7 +173,7 @@ } .discussion-form { - background-color: $white-light; + background-color: $white; @include media-breakpoint-down(xs) { .user-avatar-link { @@ -217,7 +217,7 @@ table { font-size: 14px; .md-area { - background-color: $white-light; + background-color: $white; } } @@ -235,7 +235,7 @@ table { &.alert-dismissable { .close { - color: $white-light; + color: $white; opacity: 0.85; font-weight: $gl-font-weight-normal; @@ -416,7 +416,7 @@ table { float: right; i { - color: $white-light; + color: $white; padding-right: 2px; margin-top: 2px; } diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index f2b8433a995..25d8fc1f9a3 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -364,7 +364,7 @@ $note-form-margin-left: 72px; left: $gl-padding-24; right: 0; bottom: 0; - background: linear-gradient(rgba($white-light, 0.1) -100px, $white-light 100%); + background: linear-gradient(rgba($white, 0.1) -100px, $white 100%); } } } @@ -380,7 +380,7 @@ $note-form-margin-left: 72px; .timeline-icon { display: flex; align-items: center; - background-color: $white-light; + background-color: $white; width: $system-note-icon-size; height: $system-note-icon-size; border: 1px solid $border-color; @@ -470,7 +470,7 @@ $note-form-margin-left: 72px; } .system-note { - background-color: $white-light; + background-color: $white; padding: $gl-padding; } } @@ -506,7 +506,7 @@ $note-form-margin-left: 72px; // Fixes subpixel rounding issue https://gitlab.com/gitlab-org/gitlab-foss/issues/53973 // background-color is needed for dark code preference padding-bottom: 1px; - background-color: $white-light; + background-color: $white; &.parallel { border-width: 1px; @@ -517,7 +517,7 @@ $note-form-margin-left: 72px; } .notes { - background-color: $white-light; + background-color: $white; } a code { @@ -561,7 +561,7 @@ $note-form-margin-left: 72px; .code-commit .notes-content, .diff-viewer > .image ~ .note-container { - background-color: $white-light; + background-color: $white; .avatar-note-form-holder { .user-avatar-link img { @@ -827,7 +827,7 @@ $note-form-margin-left: 72px; &.discussion-locked { border: 0; - background-color: $white-light; + background-color: $white; } a:not(.learn-more) { diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 8b0dd73c565..154717f9776 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -16,7 +16,7 @@ width: 100%; border: 1px solid $border-color; border-radius: $border-radius; - background-color: $white-light; + background-color: $white; &:hover { background-color: $gray-darker; @@ -675,7 +675,7 @@ &.ci-action-icon-wrapper { height: 30px; width: 30px; - background: $white-light; + background: $white; border: 1px solid $border-color; border-radius: 100%; display: block; @@ -768,7 +768,7 @@ @mixin mini-pipeline-item() { border-radius: 100px; - background-color: $white-light; + background-color: $white; border-width: 1px; border-style: solid; width: $ci-action-icon-size; @@ -852,7 +852,7 @@ button.mini-pipeline-graph-dropdown-toggle { height: $ci-action-dropdown-button-size; width: $ci-action-dropdown-button-size; - background: $white-light; + background: $white; border: 1px solid $border-color; border-radius: 50%; display: block; @@ -977,7 +977,7 @@ button.mini-pipeline-graph-dropdown-toggle { &::after { left: -5px; border-width: 10px 7px 10px 0; - border-right-color: $white-light; + border-right-color: $white; } } @@ -1012,7 +1012,7 @@ button.mini-pipeline-graph-dropdown-toggle { &::after { margin-top: 1px; - border-bottom-color: $white-light; + border-bottom-color: $white; } /** diff --git a/app/assets/stylesheets/pages/profile.scss b/app/assets/stylesheets/pages/profile.scss index 82b3698287c..85836962b06 100644 --- a/app/assets/stylesheets/pages/profile.scss +++ b/app/assets/stylesheets/pages/profile.scss @@ -428,7 +428,7 @@ table.u2f-registrations { } .gitlab-slack-well { - background-color: $white-light; + background-color: $white; box-shadow: none; max-width: $add-to-slack-well-max-width; } diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 8b2c67378d9..c0a1cf10fe4 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -542,7 +542,7 @@ .input-group-text { width: 100%; - background-color: $white-light; + background-color: $white; } .selected-icon { @@ -655,7 +655,7 @@ z-index: 10; padding: $gl-padding-8 0; text-align: center; - background-color: $white-light; + background-color: $white; color: $gl-text-color-tertiary; transform: translateY(-50%); font-size: 12px; @@ -821,7 +821,7 @@ .repository-languages-bar { height: 8px; margin-bottom: $gl-padding-8; - background-color: $white-light; + background-color: $white; border-radius: $border-radius-default; .progress-bar { @@ -1150,7 +1150,7 @@ pre.light-well { .form-control { @extend .monospace; - background-color: $white-light; + background-color: $white; border-color: $border-color; font-size: 14px; margin-left: -1px; @@ -1181,7 +1181,7 @@ pre.light-well { } i:nth-child(2) { - color: $white-light; + color: $white; } } @@ -1385,7 +1385,7 @@ pre.light-well { padding: 32px; margin: 32px; border-radius: 3px; - background-color: $white-light; + background-color: $white; h3 { margin-top: 0; diff --git a/app/assets/stylesheets/pages/prometheus.scss b/app/assets/stylesheets/pages/prometheus.scss index 5872c90a25e..6e5daef3e7d 100644 --- a/app/assets/stylesheets/pages/prometheus.scss +++ b/app/assets/stylesheets/pages/prometheus.scss @@ -31,7 +31,7 @@ } &.sortable-chosen .draggable-panel { - background: $white-light; + background: $white; box-shadow: 0 0 4px $gray-500; } @@ -41,7 +41,7 @@ .draggable-remove-link { cursor: pointer; color: $gray-600; - background-color: $white-light; + background-color: $white; } } } diff --git a/app/assets/stylesheets/pages/runners.scss b/app/assets/stylesheets/pages/runners.scss index 59f01f3e958..dc3811bab65 100644 --- a/app/assets/stylesheets/pages/runners.scss +++ b/app/assets/stylesheets/pages/runners.scss @@ -1,7 +1,7 @@ .runner-state { padding: 6px 12px; margin-right: 10px; - color: $white-light; + color: $white; &.runner-state-shared { background: $green-400; diff --git a/app/assets/stylesheets/pages/search.scss b/app/assets/stylesheets/pages/search.scss index f8127dc794a..d8084a20af9 100644 --- a/app/assets/stylesheets/pages/search.scss +++ b/app/assets/stylesheets/pages/search.scss @@ -63,7 +63,7 @@ input[type='checkbox']:hover { margin-left: 5px; line-height: 25px; width: 98%; - color: $white-light; + color: $white; background: none; transition: color ease-in-out $default-transition-duration; } diff --git a/app/assets/stylesheets/pages/settings.scss b/app/assets/stylesheets/pages/settings.scss index c90b92a5b49..2c0ca792ec3 100644 --- a/app/assets/stylesheets/pages/settings.scss +++ b/app/assets/stylesheets/pages/settings.scss @@ -261,7 +261,7 @@ } .card-header .label-count { - color: $white-light; + color: $white; background: $common-gray-dark; } @@ -325,7 +325,7 @@ .saml-settings.info-well { .form-control[readonly] { - background: $white-light; + background: $white; } } @@ -340,7 +340,7 @@ a { font-weight: $gl-font-weight-bold; - color: $white-light; + color: $white; } } @@ -355,7 +355,7 @@ } .btn-clipboard { - background-color: $white-light; + background-color: $white; border: 1px solid $gray-200; } @@ -368,7 +368,7 @@ .mirror-error-badge { background-color: $red-400; border-radius: $border-radius-default; - color: $white-light; + color: $white; } .push-pull-table { diff --git a/app/assets/stylesheets/pages/todos.scss b/app/assets/stylesheets/pages/todos.scss index ece0ac04baf..bbb37479fb0 100644 --- a/app/assets/stylesheets/pages/todos.scss +++ b/app/assets/stylesheets/pages/todos.scss @@ -44,7 +44,7 @@ } &.todo-pending.done-reversible { - background-color: $white-light; + background-color: $white; &:hover { border-color: $white-normal; diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss index 81e910f91c2..2ec3454630b 100644 --- a/app/assets/stylesheets/pages/tree.scss +++ b/app/assets/stylesheets/pages/tree.scss @@ -101,7 +101,7 @@ border-top: 1px solid $white-normal; &:last-of-type { - border-bottom-color: $white-light; + border-bottom-color: $white; } td, diff --git a/app/assets/stylesheets/performance_bar.scss b/app/assets/stylesheets/performance_bar.scss index 87e650c7659..4eef4d361a1 100644 --- a/app/assets/stylesheets/performance_bar.scss +++ b/app/assets/stylesheets/performance_bar.scss @@ -80,7 +80,7 @@ } strong { - color: $white-light; + color: $white; } table { diff --git a/app/assets/stylesheets/snippets.scss b/app/assets/stylesheets/snippets.scss index 0008a0e5c51..93a12cf28a2 100644 --- a/app/assets/stylesheets/snippets.scss +++ b/app/assets/stylesheets/snippets.scss @@ -28,7 +28,7 @@ } .blob-viewer { - background-color: $white-light; + background-color: $white; text-align: left; } @@ -131,7 +131,7 @@ .btn-group { a.btn { - background-color: $white-light; + background-color: $white; text-decoration: none; padding: 8px 9px; border: $border-style; diff --git a/app/assets/stylesheets/vendors/atwho.scss b/app/assets/stylesheets/vendors/atwho.scss index 37ef52f9573..f855c5c0d3d 100644 --- a/app/assets/stylesheets/vendors/atwho.scss +++ b/app/assets/stylesheets/vendors/atwho.scss @@ -32,7 +32,7 @@ .cur { .avatar { @include disable-all-animation; - border: 1px solid $white-light; + border: 1px solid $white; } } diff --git a/app/assets/stylesheets/vendors/tribute.scss b/app/assets/stylesheets/vendors/tribute.scss index 95b1d80a586..309cdf7245c 100644 --- a/app/assets/stylesheets/vendors/tribute.scss +++ b/app/assets/stylesheets/vendors/tribute.scss @@ -1,5 +1,5 @@ .tribute-container { - background: $white-light; + background: $white; border: 1px solid $gl-gray-100; border-radius: $border-radius-base; box-shadow: 0 0 5px $issue-boards-card-shadow; @@ -30,7 +30,7 @@ .avatar { @include disable-all-animation; - border: 1px solid $white-light; + border: 1px solid $white; } small { diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index ce71730cef1..1ee3c52ad35 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -217,6 +217,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :lets_encrypt_terms_of_service_accepted, :domain_blacklist_file, :raw_blob_request_limit, + :namespace_storage_size_limit, disabled_oauth_sign_in_sources: [], import_sources: [], repository_storages: [], diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 64ca7446fa5..9254f7dd633 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -337,6 +337,10 @@ class ApplicationSetting < ApplicationRecord length: { maximum: 255 }, allow_blank: true + validates :namespace_storage_size_limit, + presence: true, + numericality: { only_integer: true, greater_than_or_equal_to: 0 } + attr_encrypted :asset_proxy_secret_key, mode: :per_attribute_iv, key: Settings.attr_encrypted_db_key_base_truncated, diff --git a/app/models/application_setting_implementation.rb b/app/models/application_setting_implementation.rb index 5ad382d8670..418fb18cc91 100644 --- a/app/models/application_setting_implementation.rb +++ b/app/models/application_setting_implementation.rb @@ -111,6 +111,7 @@ module ApplicationSettingImplementation sourcegraph_url: nil, sourcegraph_public_only: true, minimum_password_length: DEFAULT_MINIMUM_PASSWORD_LENGTH, + namespace_storage_size_limit: 0, terminal_max_session_time: 0, throttle_authenticated_api_enabled: false, throttle_authenticated_api_period_in_seconds: 3600, diff --git a/doc/user/admin_area/settings/index.md b/doc/user/admin_area/settings/index.md index e85ab9051d4..b5612ba66c1 100644 --- a/doc/user/admin_area/settings/index.md +++ b/doc/user/admin_area/settings/index.md @@ -36,7 +36,7 @@ Access the default page for admin area settings by navigating to | [Slack application](../../../user/project/integrations/gitlab_slack_application.md#configuration) **(FREE ONLY)** | Slack integration allows you to interact with GitLab via slash commands in a chat window. This option is only available on GitLab.com, though it may be [available for self-managed instances in the future](https://gitlab.com/gitlab-org/gitlab/-/issues/28164). | | [Third party offers](third_party_offers.md) | Control the display of third party offers. | | [Snowplow](../../../telemetry/index.md#enabling-tracking) | Configure the Snowplow integration. | -| [Amazon EKS](../../project/clusters/add_remove_clusters.md#additional-requirements-for-self-managed-instances-core-only) | Amazon EKS integration allows you to provision EKS clusters from GitLab. | +| [Amazon EKS](../../project/clusters/add_new_eks_cluster.md#additional-requirements-for-self-managed-instances-core-only) | Amazon EKS integration allows you to provision EKS clusters from GitLab. | ## Repository diff --git a/doc/user/project/clusters/add_new_eks_cluster.md b/doc/user/project/clusters/add_new_eks_cluster.md new file mode 100644 index 00000000000..300eeaabdb0 --- /dev/null +++ b/doc/user/project/clusters/add_new_eks_cluster.md @@ -0,0 +1,305 @@ +# Adding a new EKS Cluster + +## EKS requirements + +Before creating your first cluster on Amazon EKS with GitLab's integration, make sure the following +requirements are met: + +- An [Amazon Web Services](https://aws.amazon.com/) account is set up and you are able to log in. +- You have permissions to manage IAM resources. +- If you want to use an [existing EKS cluster](add_new_eks_cluster.md#existing-eks-cluster): + - An Amazon EKS cluster with worker nodes properly configured. + - `kubectl` [installed and configured](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#get-started-kubectl) + for access to the EKS cluster. + +### Additional requirements for self-managed instances **(CORE ONLY)** + +If you are using a self-managed GitLab instance, GitLab must first be configured with a set of +Amazon credentials. These credentials will be used to assume an Amazon IAM role provided by the user +creating the cluster. Create an IAM user and ensure it has permissions to assume the role(s) that +your users will use to create EKS clusters. + +For example, the following policy document allows assuming a role whose name starts with +`gitlab-eks-` in account `123456789012`: + +```json +{ + "Version": "2012-10-17", + "Statement": { + "Effect": "Allow", + "Action": "sts:AssumeRole", + "Resource": "arn:aws:iam::123456789012:role/gitlab-eks-*" + } +} +``` + +Generate an access key for the IAM user, and configure GitLab with the credentials: + +1. Navigate to **Admin Area > Settings > Integrations** and expand the **Amazon EKS** section. +1. Check **Enable Amazon EKS integration**. +1. Enter the account ID and access key credentials into the respective + `Account ID`, `Access key ID` and `Secret access key` fields. +1. Click **Save changes**. + +## New EKS cluster + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/22392) in GitLab 12.5. + +To create and add a new Kubernetes cluster to your project, group, or instance: + +1. Navigate to your: + - Project's **Operations > Kubernetes** page, for a project-level cluster. + - Group's **Kubernetes** page, for a group-level cluster. + - **Admin Area > Kubernetes** page, for an instance-level cluster. +1. Click **Add Kubernetes cluster**. +1. Under the **Create new cluster** tab, click **Amazon EKS**. You will be provided with an + `Account ID` and `External ID` to use in the next step. +1. In the [IAM Management Console](https://console.aws.amazon.com/iam/home), create an IAM role: + 1. From the left panel, select **Roles**. + 1. Click **Create role**. + 1. Under `Select type of trusted entity`, select **Another AWS account**. + 1. Enter the Account ID from GitLab into the `Account ID` field. + 1. Check **Require external ID**. + 1. Enter the External ID from GitLab into the `External ID` field. + 1. Click **Next: Permissions**. + 1. Click **Create Policy**, which will open a new window. + 1. Select the **JSON** tab, and paste in the following snippet in place of the existing content: + + ```json + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "autoscaling:CreateAutoScalingGroup", + "autoscaling:DescribeAutoScalingGroups", + "autoscaling:DescribeScalingActivities", + "autoscaling:UpdateAutoScalingGroup", + "autoscaling:CreateLaunchConfiguration", + "autoscaling:DescribeLaunchConfigurations", + "cloudformation:CreateStack", + "cloudformation:DescribeStacks", + "ec2:AuthorizeSecurityGroupEgress", + "ec2:AuthorizeSecurityGroupIngress", + "ec2:RevokeSecurityGroupEgress", + "ec2:RevokeSecurityGroupIngress", + "ec2:CreateSecurityGroup", + "ec2:createTags", + "ec2:DescribeImages", + "ec2:DescribeKeyPairs", + "ec2:DescribeRegions", + "ec2:DescribeSecurityGroups", + "ec2:DescribeSubnets", + "ec2:DescribeVpcs", + "eks:CreateCluster", + "eks:DescribeCluster", + "iam:AddRoleToInstanceProfile", + "iam:AttachRolePolicy", + "iam:CreateRole", + "iam:CreateInstanceProfile", + "iam:CreateServiceLinkedRole", + "iam:GetRole", + "iam:ListRoles", + "iam:PassRole", + "ssm:GetParameters" + ], + "Resource": "*" + } + ] + } + ``` + + NOTE: **Note:** + These permissions give GitLab the ability to create resources, but not delete them. + This means that if an error is encountered during the creation process, changes will + not be rolled back and you must remove resources manually. You can do this by deleting + the relevant [CloudFormation stack](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-delete-stack.html) + + 1. Click **Review policy**. + 1. Enter a suitable name for this policy, and click **Create Policy**. You can now close this window. + 1. Switch back to the "Create role" window, and select the policy you just created. + 1. Click **Next: Tags**, and optionally enter any tags you wish to associate with this role. + 1. Click **Next: Review**. + 1. Enter a role name and optional description into the fields provided. + 1. Click **Create role**, the new role name will appear at the top. Click on its name and copy the `Role ARN` from the newly created role. +1. In GitLab, enter the copied role ARN into the `Role ARN` field. +1. Click **Authenticate with AWS**. +1. Choose your cluster's settings: + - **Kubernetes cluster name** - The name you wish to give the cluster. + - **Environment scope** - The [associated environment](index.md#setting-the-environment-scope-premium) to this cluster. + - **Kubernetes version** - The Kubernetes version to use. Currently the only version supported is 1.14. + - **Role name** - Select the [IAM role](https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) + to allow Amazon EKS and the Kubernetes control plane to manage AWS resources on your behalf. This IAM role is separate + to the IAM role created above, you will need to create it if it does not yet exist. + - **Region** - The [region](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html) + in which the cluster will be created. + - **Key pair name** - Select the [key pair](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) + that you can use to connect to your worker nodes if required. + - **VPC** - Select a [VPC](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) + to use for your EKS Cluster resources. + - **Subnets** - Choose the [subnets](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) + in your VPC where your worker nodes will run. + - **Security group** - Choose the [security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) + to apply to the EKS-managed Elastic Network Interfaces that are created in your worker node subnets. + - **Instance type** - The [instance type](https://aws.amazon.com/ec2/instance-types/) of your worker nodes. + - **Node count** - The number of worker nodes. + - **GitLab-managed cluster** - Leave this checked if you want GitLab to manage namespaces and service accounts for this cluster. + See the [Managed clusters section](index.md#gitlab-managed-clusters) for more information. +1. Finally, click the **Create Kubernetes cluster** button. + +After about 10 minutes, your cluster will be ready to go. You can now proceed +to install some [pre-defined applications](index.md#installing-applications). + +NOTE: **Note:** +You will need to add your AWS external ID to the +[IAM Role in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html#cli-configure-role-xaccount) +to manage your cluster using `kubectl`. + +## Existing EKS cluster + +To add an existing EKS cluster to your project, group, or instance: + +1. Perform the following steps on the EKS cluster: + 1. Retrieve the certificate. A valid Kubernetes certificate is needed to authenticate to the + EKS cluster. We will use the certificate created by default. + Open a shell and use `kubectl` to retrieve it: + + 1. List the secrets with `kubectl get secrets`, and one should named similar to + `default-token-xxxxx`. Copy that token name for use below. + 1. Get the certificate with: + + ```shell + kubectl get secret <secret name> -o jsonpath="{['data']['ca\.crt']}" | base64 --decode + ``` + + 1. Create admin token. A `cluster-admin` token is required to install and manage Helm Tiller. + GitLab establishes mutual SSL authentication with Helm Tiller and creates limited service + accounts for each application. To create the token we will create an admin service account as + follows: + + 1. Create a file called `eks-admin-service-account.yaml` with contents: + + ```yaml + apiVersion: v1 + kind: ServiceAccount + metadata: + name: eks-admin + namespace: kube-system + ``` + + 1. Apply the service account to your cluster: + + ```shell + $ kubectl apply -f eks-admin-service-account.yaml + serviceaccount "eks-admin" created + ``` + + 1. Create a file called `eks-admin-cluster-role-binding.yaml` with contents: + + ```yaml + apiVersion: rbac.authorization.k8s.io/v1beta1 + kind: ClusterRoleBinding + metadata: + name: eks-admin + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin + subjects: + - kind: ServiceAccount + name: eks-admin + namespace: kube-system + ``` + + 1. Apply the cluster role binding to your cluster: + + ```shell + $ kubectl apply -f eks-admin-cluster-role-binding.yaml + clusterrolebinding "eks-admin" created + ``` + + 1. Retrieve the token for the `eks-admin` service account: + + ```shell + kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}') + ``` + + Copy the `<authentication_token>` value from the output: + + ```yaml + Name: eks-admin-token-b5zv4 + Namespace: kube-system + Labels: <none> + Annotations: kubernetes.io/service-account.name=eks-admin + kubernetes.io/service-account.uid=bcfe66ac-39be-11e8-97e8-026dce96b6e8 + + Type: kubernetes.io/service-account-token + + Data + ==== + ca.crt: 1025 bytes + namespace: 11 bytes + token: <authentication_token> + ``` + + 1. Locate the the API server endpoint so GitLab can connect to the cluster. This is displayed on + the AWS EKS console, when viewing the EKS cluster details. +1. Navigate to your: + - Project's **Operations > Kubernetes** page, for a project-level cluster. + - Group's **Kubernetes** page, for a group-level cluster. + - **Admin Area > Kubernetes** page, for an instance-level cluster. +1. Click **Add Kubernetes cluster**. +1. Click the **Add existing cluster** tab and fill in the details: + - **Kubernetes cluster name**: A name for the cluster to identify it within GitLab. + - **Environment scope**: Leave this as `*` for now, since we are only connecting a single cluster. + - **API URL**: The API server endpoint retrieved earlier. + - **CA Certificate**: The certificate data from the earlier step, as-is. + - **Service Token**: The admin token value. + - For project-level clusters, **Project namespace prefix**: This can be left blank to accept the + default namespace, based on the project name. +1. Click on **Add Kubernetes cluster**. The cluster is now connected to GitLab. + +At this point, [Kubernetes deployment variables](index.md#deployment-variables) will +automatically be available during CI/CD jobs, making it easy to interact with the cluster. + +If you would like to utilize your own CI/CD scripts to deploy to the cluster, you can stop here. + +### Create a default Storage Class + +Amazon EKS doesn't have a default Storage Class out of the box, which means +requests for persistent volumes will not be automatically fulfilled. As part +of Auto DevOps, the deployed PostgreSQL instance requests persistent storage, +and without a default storage class it will fail to start. + +If a default Storage Class doesn't already exist and is desired, follow Amazon's +[guide on storage classes](https://docs.aws.amazon.com/eks/latest/userguide/storage-classes.html) +to create one. + +Alternatively, disable PostgreSQL by setting the project variable +[`POSTGRES_ENABLED`](../../../topics/autodevops/#environment-variables) to `false`. + +### Deploy the app to EKS + +With RBAC disabled and services deployed, +[Auto DevOps](../../../topics/autodevops/index.md) can now be leveraged +to build, test, and deploy the app. + +[Enable Auto DevOps](../../../topics/autodevops/index.md#at-the-project-level) +if not already enabled. If a wildcard DNS entry was created resolving to the +Load Balancer, enter it in the `domain` field under the Auto DevOps settings. +Otherwise, the deployed app will not be externally available outside of the cluster. + +![Deploy Pipeline](img/pipeline.png) + +A new pipeline will automatically be created, which will begin to build, test, +and deploy the app. + +After the pipeline has finished, your app will be running in EKS and available +to users. Click on **CI/CD > Environments**. + +![Deployed Environment](img/environment.png) + +You will see a list of the environments and their deploy status, as well as +options to browse to the app, view monitoring metrics, and even access a shell +on the running pod. diff --git a/doc/user/project/clusters/add_new_gke_cluster.md b/doc/user/project/clusters/add_new_gke_cluster.md new file mode 100644 index 00000000000..8f5269d64af --- /dev/null +++ b/doc/user/project/clusters/add_new_gke_cluster.md @@ -0,0 +1,76 @@ +# Adding a new GKE Cluster + +## GKE requirements + +Before creating your first cluster on Google GKE with GitLab's integration, make sure the following +requirements are met: + +- A [billing account](https://cloud.google.com/billing/docs/how-to/manage-billing-account) + set up with access. +- The Kubernetes Engine API and related service are enabled. It should work immediately but may + take up to 10 minutes after you create a project. For more information see the + ["Before you begin" section of the Kubernetes Engine docs](https://cloud.google.com/kubernetes-engine/docs/quickstart#before-you-begin). + +## New GKE cluster + +Starting from [GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/issues/25925), all the GKE clusters +provisioned by GitLab are [VPC-native](https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips). + +### Important notes + +Note the following: + +- The [Google authentication integration](../../../integration/google.md) must be enabled in GitLab + at the instance level. If that's not the case, ask your GitLab administrator to enable it. On + GitLab.com, this is enabled. +- Starting from [GitLab 12.1](https://gitlab.com/gitlab-org/gitlab-foss/issues/55902), all GKE clusters + created by GitLab are RBAC-enabled. Take a look at the [RBAC section](add_remove_clusters.md#rbac-cluster-resources) for + more information. +- Starting from [GitLab 12.5](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18341), the + cluster's pod address IP range will be set to /16 instead of the regular /14. /16 is a CIDR + notation. +- GitLab requires basic authentication enabled and a client certificate issued for the cluster to + set up an [initial service account](add_remove_clusters.md#access-controls). Starting from [GitLab + 11.10](https://gitlab.com/gitlab-org/gitlab-foss/issues/58208), the cluster creation process will + explicitly request that basic authentication and client certificate is enabled. + +### Creating the cluster on GKE + +To create and add a new Kubernetes cluster to your project, group, or instance: + +1. Navigate to your: + - Project's **Operations > Kubernetes** page, for a project-level cluster. + - Group's **Kubernetes** page, for a group-level cluster. + - **Admin Area > Kubernetes** page, for an instance-level cluster. +1. Click **Add Kubernetes cluster**. +1. Under the **Create new cluster** tab, click **Google GKE**. +1. Connect your Google account if you haven't done already by clicking the + **Sign in with Google** button. +1. Choose your cluster's settings: + - **Kubernetes cluster name** - The name you wish to give the cluster. + - **Environment scope** - The [associated environment](index.md#setting-the-environment-scope-premium) to this cluster. + - **Google Cloud Platform project** - Choose the project you created in your GCP + console that will host the Kubernetes cluster. Learn more about + [Google Cloud Platform projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects). + - **Zone** - Choose the [region zone](https://cloud.google.com/compute/docs/regions-zones/) + under which the cluster will be created. + - **Number of nodes** - Enter the number of nodes you wish the cluster to have. + - **Machine type** - The [machine type](https://cloud.google.com/compute/docs/machine-types) + of the Virtual Machine instance that the cluster will be based on. + - **Enable Cloud Run for Anthos** - Check this if you want to use Cloud Run for Anthos for this cluster. + See the [Cloud Run for Anthos section](#cloud-run-for-anthos) for more information. + - **GitLab-managed cluster** - Leave this checked if you want GitLab to manage namespaces and service accounts for this cluster. + See the [Managed clusters section](index.md#gitlab-managed-clusters) for more information. +1. Finally, click the **Create Kubernetes cluster** button. + +After a couple of minutes, your cluster will be ready to go. You can now proceed +to install some [pre-defined applications](index.md#installing-applications). + +### Cloud Run for Anthos + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/16566) in GitLab 12.4. + +You can choose to use Cloud Run for Anthos in place of installing Knative and Istio +separately after the cluster has been created. This means that Cloud Run +(Knative), Istio, and HTTP Load Balancing will be enabled on the cluster at +create time and cannot be [installed or uninstalled](../../clusters/applications.md) separately. diff --git a/doc/user/project/clusters/add_remove_clusters.md b/doc/user/project/clusters/add_remove_clusters.md index 026e627f868..4aaa3850a94 100644 --- a/doc/user/project/clusters/add_remove_clusters.md +++ b/doc/user/project/clusters/add_remove_clusters.md @@ -28,57 +28,12 @@ Before [adding a Kubernetes cluster](#add-new-cluster) using GitLab, you need: - [Admin Area access](../../admin_area/index.md) for a self-managed instance-level cluster. **(CORE ONLY)** -### GKE requirements - -Before creating your first cluster on Google GKE with GitLab's integration, make sure the following -requirements are met: - -- A [billing account](https://cloud.google.com/billing/docs/how-to/manage-billing-account) - set up with access. -- The Kubernetes Engine API and related service are enabled. It should work immediately but may - take up to 10 minutes after you create a project. For more information see the - ["Before you begin" section of the Kubernetes Engine docs](https://cloud.google.com/kubernetes-engine/docs/quickstart#before-you-begin). - -### EKS requirements - -Before creating your first cluster on Amazon EKS with GitLab's integration, make sure the following -requirements are met: - -- An [Amazon Web Services](https://aws.amazon.com/) account is set up and you are able to log in. -- You have permissions to manage IAM resources. -- If you want to use an [existing EKS cluster](#existing-eks-cluster): - - An Amazon EKS cluster with worker nodes properly configured. - - `kubectl` [installed and configured](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#get-started-kubectl) - for access to the EKS cluster. - -#### Additional requirements for self-managed instances **(CORE ONLY)** - -If you are using a self-managed GitLab instance, GitLab must first be configured with a set of -Amazon credentials. These credentials will be used to assume an Amazon IAM role provided by the user -creating the cluster. Create an IAM user and ensure it has permissions to assume the role(s) that -your users will use to create EKS clusters. - -For example, the following policy document allows assuming a role whose name starts with -`gitlab-eks-` in account `123456789012`: - -```json -{ - "Version": "2012-10-17", - "Statement": { - "Effect": "Allow", - "Action": "sts:AssumeRole", - "Resource": "arn:aws:iam::123456789012:role/gitlab-eks-*" - } -} -``` +## Add new cluster -Generate an access key for the IAM user, and configure GitLab with the credentials: +New clusters can be added using GitLab for: -1. Navigate to **Admin Area > Settings > Integrations** and expand the **Amazon EKS** section. -1. Check **Enable Amazon EKS integration**. -1. Enter the account ID and access key credentials into the respective - `Account ID`, `Access key ID` and `Secret access key` fields. -1. Click **Save changes**. +- [Google Kubernetes Engine (GKE)](add_new_gke_cluster.md). +- [Amazon Elastic Kubernetes Service (EKS)](add_new_eks_cluster.md). ## Access controls @@ -179,192 +134,6 @@ If you don't want to use GitLab Runner in privileged mode, either: 1. Installing a Runner [using `docker+machine`](https://docs.gitlab.com/runner/executors/docker_machine.html). -## Add new cluster - -New clusters can be added using GitLab for: - -- Google Kubernetes Engine. -- Amazon Elastic Kubernetes Service. - -### New GKE cluster - -Starting from [GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/issues/25925), all the GKE clusters -provisioned by GitLab are [VPC-native](https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips). - -#### Important notes - -Note the following: - -- The [Google authentication integration](../../../integration/google.md) must be enabled in GitLab - at the instance level. If that's not the case, ask your GitLab administrator to enable it. On - GitLab.com, this is enabled. -- Starting from [GitLab 12.1](https://gitlab.com/gitlab-org/gitlab-foss/issues/55902), all GKE clusters - created by GitLab are RBAC-enabled. Take a look at the [RBAC section](#rbac-cluster-resources) for - more information. -- Starting from [GitLab 12.5](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18341), the - cluster's pod address IP range will be set to /16 instead of the regular /14. /16 is a CIDR - notation. -- GitLab requires basic authentication enabled and a client certificate issued for the cluster to - set up an [initial service account](#access-controls). Starting from [GitLab - 11.10](https://gitlab.com/gitlab-org/gitlab-foss/issues/58208), the cluster creation process will - explicitly request that basic authentication and client certificate is enabled. - -#### Creating the cluster on GKE - -To create and add a new Kubernetes cluster to your project, group, or instance: - -1. Navigate to your: - - Project's **Operations > Kubernetes** page, for a project-level cluster. - - Group's **Kubernetes** page, for a group-level cluster. - - **Admin Area > Kubernetes** page, for an instance-level cluster. -1. Click **Add Kubernetes cluster**. -1. Under the **Create new cluster** tab, click **Google GKE**. -1. Connect your Google account if you haven't done already by clicking the - **Sign in with Google** button. -1. Choose your cluster's settings: - - **Kubernetes cluster name** - The name you wish to give the cluster. - - **Environment scope** - The [associated environment](index.md#setting-the-environment-scope-premium) to this cluster. - - **Google Cloud Platform project** - Choose the project you created in your GCP - console that will host the Kubernetes cluster. Learn more about - [Google Cloud Platform projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - - **Zone** - Choose the [region zone](https://cloud.google.com/compute/docs/regions-zones/) - under which the cluster will be created. - - **Number of nodes** - Enter the number of nodes you wish the cluster to have. - - **Machine type** - The [machine type](https://cloud.google.com/compute/docs/machine-types) - of the Virtual Machine instance that the cluster will be based on. - - **Enable Cloud Run for Anthos** - Check this if you want to use Cloud Run for Anthos for this cluster. - See the [Cloud Run for Anthos section](#cloud-run-for-anthos) for more information. - - **GitLab-managed cluster** - Leave this checked if you want GitLab to manage namespaces and service accounts for this cluster. - See the [Managed clusters section](index.md#gitlab-managed-clusters) for more information. -1. Finally, click the **Create Kubernetes cluster** button. - -After a couple of minutes, your cluster will be ready to go. You can now proceed -to install some [pre-defined applications](index.md#installing-applications). - -#### Cloud Run for Anthos - -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/16566) in GitLab 12.4. - -You can choose to use Cloud Run for Anthos in place of installing Knative and Istio -separately after the cluster has been created. This means that Cloud Run -(Knative), Istio, and HTTP Load Balancing will be enabled on the cluster at -create time and cannot be [installed or uninstalled](../../clusters/applications.md) separately. - -### New EKS cluster - -> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/22392) in GitLab 12.5. - -To create and add a new Kubernetes cluster to your project, group, or instance: - -1. Navigate to your: - - Project's **Operations > Kubernetes** page, for a project-level cluster. - - Group's **Kubernetes** page, for a group-level cluster. - - **Admin Area > Kubernetes** page, for an instance-level cluster. -1. Click **Add Kubernetes cluster**. -1. Under the **Create new cluster** tab, click **Amazon EKS**. You will be provided with an - `Account ID` and `External ID` to use in the next step. -1. In the [IAM Management Console](https://console.aws.amazon.com/iam/home), create an IAM role: - 1. From the left panel, select **Roles**. - 1. Click **Create role**. - 1. Under `Select type of trusted entity`, select **Another AWS account**. - 1. Enter the Account ID from GitLab into the `Account ID` field. - 1. Check **Require external ID**. - 1. Enter the External ID from GitLab into the `External ID` field. - 1. Click **Next: Permissions**. - 1. Click **Create Policy**, which will open a new window. - 1. Select the **JSON** tab, and paste in the following snippet in place of the existing content: - - ```json - { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "autoscaling:CreateAutoScalingGroup", - "autoscaling:DescribeAutoScalingGroups", - "autoscaling:DescribeScalingActivities", - "autoscaling:UpdateAutoScalingGroup", - "autoscaling:CreateLaunchConfiguration", - "autoscaling:DescribeLaunchConfigurations", - "cloudformation:CreateStack", - "cloudformation:DescribeStacks", - "ec2:AuthorizeSecurityGroupEgress", - "ec2:AuthorizeSecurityGroupIngress", - "ec2:RevokeSecurityGroupEgress", - "ec2:RevokeSecurityGroupIngress", - "ec2:CreateSecurityGroup", - "ec2:createTags", - "ec2:DescribeImages", - "ec2:DescribeKeyPairs", - "ec2:DescribeRegions", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "eks:CreateCluster", - "eks:DescribeCluster", - "iam:AddRoleToInstanceProfile", - "iam:AttachRolePolicy", - "iam:CreateRole", - "iam:CreateInstanceProfile", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:ListRoles", - "iam:PassRole", - "ssm:GetParameters" - ], - "Resource": "*" - } - ] - } - ``` - - NOTE: **Note:** - These permissions give GitLab the ability to create resources, but not delete them. - This means that if an error is encountered during the creation process, changes will - not be rolled back and you must remove resources manually. You can do this by deleting - the relevant [CloudFormation stack](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-delete-stack.html) - - 1. Click **Review policy**. - 1. Enter a suitable name for this policy, and click **Create Policy**. You can now close this window. - 1. Switch back to the "Create role" window, and select the policy you just created. - 1. Click **Next: Tags**, and optionally enter any tags you wish to associate with this role. - 1. Click **Next: Review**. - 1. Enter a role name and optional description into the fields provided. - 1. Click **Create role**, the new role name will appear at the top. Click on its name and copy the `Role ARN` from the newly created role. -1. In GitLab, enter the copied role ARN into the `Role ARN` field. -1. Click **Authenticate with AWS**. -1. Choose your cluster's settings: - - **Kubernetes cluster name** - The name you wish to give the cluster. - - **Environment scope** - The [associated environment](index.md#setting-the-environment-scope-premium) to this cluster. - - **Kubernetes version** - The Kubernetes version to use. Currently the only version supported is 1.14. - - **Role name** - Select the [IAM role](https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) - to allow Amazon EKS and the Kubernetes control plane to manage AWS resources on your behalf. This IAM role is separate - to the IAM role created above, you will need to create it if it does not yet exist. - - **Region** - The [region](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html) - in which the cluster will be created. - - **Key pair name** - Select the [key pair](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) - that you can use to connect to your worker nodes if required. - - **VPC** - Select a [VPC](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) - to use for your EKS Cluster resources. - - **Subnets** - Choose the [subnets](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) - in your VPC where your worker nodes will run. - - **Security group** - Choose the [security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) - to apply to the EKS-managed Elastic Network Interfaces that are created in your worker node subnets. - - **Instance type** - The [instance type](https://aws.amazon.com/ec2/instance-types/) of your worker nodes. - - **Node count** - The number of worker nodes. - - **GitLab-managed cluster** - Leave this checked if you want GitLab to manage namespaces and service accounts for this cluster. - See the [Managed clusters section](index.md#gitlab-managed-clusters) for more information. -1. Finally, click the **Create Kubernetes cluster** button. - -After about 10 minutes, your cluster will be ready to go. You can now proceed -to install some [pre-defined applications](index.md#installing-applications). - -NOTE: **Note:** -You will need to add your AWS external ID to the -[IAM Role in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html#cli-configure-role-xaccount) -to manage your cluster using `kubectl`. - ## Add existing cluster If you have an existing Kubernetes cluster, you can add it to a project, group, or instance. @@ -372,7 +141,7 @@ If you have an existing Kubernetes cluster, you can add it to a project, group, For more information, see information for adding an: - [Existing Kubernetes cluster](#existing-kubernetes-cluster). -- [Existing Elastic Kubernetes Service cluster](#existing-eks-cluster). +- [Existing Elastic Kubernetes Service cluster](add_new_eks_cluster.md#existing-eks-cluster). NOTE: **Note:** Kubernetes integration is not supported for arm64 clusters. See the issue @@ -522,115 +291,6 @@ To add a Kubernetes cluster to your project, group, or instance: After a couple of minutes, your cluster will be ready to go. You can now proceed to install some [pre-defined applications](index.md#installing-applications). -### Existing EKS cluster - -To add an existing EKS cluster to your project, group, or instance: - -1. Perform the following steps on the EKS cluster: - 1. Retrieve the certificate. A valid Kubernetes certificate is needed to authenticate to the - EKS cluster. We will use the certificate created by default. - Open a shell and use `kubectl` to retrieve it: - - 1. List the secrets with `kubectl get secrets`, and one should named similar to - `default-token-xxxxx`. Copy that token name for use below. - 1. Get the certificate with: - - ```shell - kubectl get secret <secret name> -o jsonpath="{['data']['ca\.crt']}" | base64 --decode - ``` - - 1. Create admin token. A `cluster-admin` token is required to install and manage Helm Tiller. - GitLab establishes mutual SSL authentication with Helm Tiller and creates limited service - accounts for each application. To create the token we will create an admin service account as - follows: - - 1. Create a file called `eks-admin-service-account.yaml` with contents: - - ```yaml - apiVersion: v1 - kind: ServiceAccount - metadata: - name: eks-admin - namespace: kube-system - ``` - - 1. Apply the service account to your cluster: - - ```shell - $ kubectl apply -f eks-admin-service-account.yaml - serviceaccount "eks-admin" created - ``` - - 1. Create a file called `eks-admin-cluster-role-binding.yaml` with contents: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1beta1 - kind: ClusterRoleBinding - metadata: - name: eks-admin - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin - subjects: - - kind: ServiceAccount - name: eks-admin - namespace: kube-system - ``` - - 1. Apply the cluster role binding to your cluster: - - ```shell - $ kubectl apply -f eks-admin-cluster-role-binding.yaml - clusterrolebinding "eks-admin" created - ``` - - 1. Retrieve the token for the `eks-admin` service account: - - ```shell - kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}') - ``` - - Copy the `<authentication_token>` value from the output: - - ```yaml - Name: eks-admin-token-b5zv4 - Namespace: kube-system - Labels: <none> - Annotations: kubernetes.io/service-account.name=eks-admin - kubernetes.io/service-account.uid=bcfe66ac-39be-11e8-97e8-026dce96b6e8 - - Type: kubernetes.io/service-account-token - - Data - ==== - ca.crt: 1025 bytes - namespace: 11 bytes - token: <authentication_token> - ``` - - 1. Locate the the API server endpoint so GitLab can connect to the cluster. This is displayed on - the AWS EKS console, when viewing the EKS cluster details. -1. Navigate to your: - - Project's **Operations > Kubernetes** page, for a project-level cluster. - - Group's **Kubernetes** page, for a group-level cluster. - - **Admin Area > Kubernetes** page, for an instance-level cluster. -1. Click **Add Kubernetes cluster**. -1. Click the **Add existing cluster** tab and fill in the details: - - **Kubernetes cluster name**: A name for the cluster to identify it within GitLab. - - **Environment scope**: Leave this as `*` for now, since we are only connecting a single cluster. - - **API URL**: The API server endpoint retrieved earlier. - - **CA Certificate**: The certificate data from the earlier step, as-is. - - **Service Token**: The admin token value. - - For project-level clusters, **Project namespace prefix**: This can be left blank to accept the - default namespace, based on the project name. -1. Click on **Add Kubernetes cluster**. The cluster is now connected to GitLab. - -At this point, [Kubernetes deployment variables](index.md#deployment-variables) will -automatically be available during CI/CD jobs, making it easy to interact with the cluster. - -If you would like to utilize your own CI/CD scripts to deploy to the cluster, you can stop here. - #### Disable Role-Based Access Control (RBAC) (optional) When connecting a cluster via GitLab integration, you may specify whether the @@ -656,45 +316,6 @@ kubectl create clusterrolebinding permissive-binding \ --group=system:serviceaccounts ``` -#### Create a default Storage Class - -Amazon EKS doesn't have a default Storage Class out of the box, which means -requests for persistent volumes will not be automatically fulfilled. As part -of Auto DevOps, the deployed PostgreSQL instance requests persistent storage, -and without a default storage class it will fail to start. - -If a default Storage Class doesn't already exist and is desired, follow Amazon's -[guide on storage classes](https://docs.aws.amazon.com/eks/latest/userguide/storage-classes.html) -to create one. - -Alternatively, disable PostgreSQL by setting the project variable -[`POSTGRES_ENABLED`](../../../topics/autodevops/#environment-variables) to `false`. - -#### Deploy the app to EKS - -With RBAC disabled and services deployed, -[Auto DevOps](../../../topics/autodevops/index.md) can now be leveraged -to build, test, and deploy the app. - -[Enable Auto DevOps](../../../topics/autodevops/index.md#at-the-project-level) -if not already enabled. If a wildcard DNS entry was created resolving to the -Load Balancer, enter it in the `domain` field under the Auto DevOps settings. -Otherwise, the deployed app will not be externally available outside of the cluster. - -![Deploy Pipeline](img/pipeline.png) - -A new pipeline will automatically be created, which will begin to build, test, -and deploy the app. - -After the pipeline has finished, your app will be running in EKS and available -to users. Click on **CI/CD > Environments**. - -![Deployed Environment](img/environment.png) - -You will see a list of the environments and their deploy status, as well as -options to browse to the app, view monitoring metrics, and even access a shell -on the running pod. - ## Enabling or disabling integration After you have successfully added your cluster information, you can enable the diff --git a/doc/user/project/clusters/eks_and_gitlab/index.md b/doc/user/project/clusters/eks_and_gitlab/index.md index 9bb8f6cb83c..1b56fe5be05 100644 --- a/doc/user/project/clusters/eks_and_gitlab/index.md +++ b/doc/user/project/clusters/eks_and_gitlab/index.md @@ -1,5 +1,5 @@ --- -redirect_to: '../add_remove_clusters.md#existing-eks-cluster' +redirect_to: '../add_new_eks_cluster.md#existing-eks-cluster' --- -This document was moved to [another location](../add_remove_clusters.md#existing-eks-cluster). +This document was moved to [another location](../add_new_eks_cluster.md#existing-eks-cluster). diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index f28465f0555..ea51f3fcdf4 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -104,6 +104,22 @@ describe Admin::ApplicationSettingsController do expect(ApplicationSetting.current.minimum_password_length).to eq(10) end + it 'updates namespace_storage_size_limit setting' do + put :update, params: { application_setting: { namespace_storage_size_limit: '100' } } + + expect(response).to redirect_to(general_admin_application_settings_path) + expect(response).to set_flash[:notice].to('Application settings saved successfully') + expect(ApplicationSetting.current.namespace_storage_size_limit).to eq(100) + end + + it 'does not accept an invalid namespace_storage_size_limit' do + put :update, params: { application_setting: { namespace_storage_size_limit: '-100' } } + + expect(response).to render_template(:general) + expect(assigns(:application_setting).errors[:namespace_storage_size_limit]).to be_present + expect(ApplicationSetting.current.namespace_storage_size_limit).not_to eq(-100) + end + context 'external policy classification settings' do let(:settings) do { diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 8307f91dfed..3ec6110d789 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -82,6 +82,11 @@ describe ApplicationSetting do it { is_expected.not_to allow_value('abc').for(:minimum_password_length) } it { is_expected.to allow_value(10).for(:minimum_password_length) } + it { is_expected.to allow_value(0).for(:namespace_storage_size_limit) } + it { is_expected.to allow_value(1).for(:namespace_storage_size_limit) } + it { is_expected.not_to allow_value(nil).for(:namespace_storage_size_limit) } + it { is_expected.not_to allow_value(-1).for(:namespace_storage_size_limit) } + context 'grafana_url validations' do before do subject.instance_variable_set(:@parsed_grafana_url, nil) |