@newskit-render/core 0.0.0-d55b7d88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ci/trigger-circleci-workflow.sh +37 -0
- package/.eslintignore +23 -0
- package/.eslintrc +74 -0
- package/.prettierignore +19 -0
- package/.prettierrc +7 -0
- package/CHANGELOG.md +7638 -0
- package/Dockerfile +14 -0
- package/Dockerfile.withNewRelic +15 -0
- package/README.md +274 -0
- package/__tests__/pages/__snapshots__/brightcove.test.tsx.snap +20 -0
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +1195 -0
- package/__tests__/pages/brightcove.test.tsx +34 -0
- package/__tests__/pages/empty.test.tsx +10 -0
- package/__tests__/pages/home.test.tsx +16 -0
- package/app-context/InstrumentationContextProvider.tsx +36 -0
- package/assets/fontFamily.ts +416 -0
- package/assets/fonts/Graphik-Black-App.ttf +0 -0
- package/assets/fonts/Graphik-BlackItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Bold-App.ttf +0 -0
- package/assets/fonts/Graphik-BoldItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Extralight-App.ttf +0 -0
- package/assets/fonts/Graphik-ExtralightItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Light-App.ttf +0 -0
- package/assets/fonts/Graphik-LightItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Medium-App.ttf +0 -0
- package/assets/fonts/Graphik-Medium-Web.woff2 +0 -0
- package/assets/fonts/Graphik-MediumItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Regular-App.ttf +0 -0
- package/assets/fonts/Graphik-Regular-Web.woff2 +0 -0
- package/assets/fonts/Graphik-RegularItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Semibold-App.ttf +0 -0
- package/assets/fonts/Graphik-Semibold-Web.woff2 +0 -0
- package/assets/fonts/Graphik-SemiboldItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Super-App.ttf +0 -0
- package/assets/fonts/Graphik-SuperItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Thin-App.ttf +0 -0
- package/assets/fonts/Graphik-ThinItalic-App.ttf +0 -0
- package/assets/fonts/Montserrat-Black.ttf +0 -0
- package/assets/fonts/Montserrat-BlackItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Bold.ttf +0 -0
- package/assets/fonts/Montserrat-BoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraBold.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraLight.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraLightItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Italic.ttf +0 -0
- package/assets/fonts/Montserrat-Light.ttf +0 -0
- package/assets/fonts/Montserrat-LightItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/assets/fonts/Montserrat-MediumItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Regular.ttf +0 -0
- package/assets/fonts/Montserrat-SemiBold.ttf +0 -0
- package/assets/fonts/Montserrat-SemiBoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Thin.ttf +0 -0
- package/assets/fonts/Montserrat-ThinItalic.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Black-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-BlackItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Bold-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Bold-Web.woff2 +0 -0
- package/assets/fonts/PublicoHeadline-BoldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Extrabold-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-ExtraboldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Italic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Light-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-LightItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Medium-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-MediumItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Roman-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Roman-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Bold-App.ttf +0 -0
- package/assets/fonts/PublicoText-BoldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoText-Italic-App.ttf +0 -0
- package/assets/fonts/PublicoText-Italic-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Roman-App.ttf +0 -0
- package/assets/fonts/PublicoText-Roman-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Semibold-App.ttf +0 -0
- package/assets/fonts/PublicoText-SemiboldItalic-App.ttf +0 -0
- package/assets/fonts/Roboto-Bold.ttf +0 -0
- package/assets/fonts/Roboto-Light.ttf +0 -0
- package/assets/fonts/Roboto-Medium.ttf +0 -0
- package/assets/fonts/Roboto-Regular.ttf +0 -0
- package/assets/fonts/TheSun-Bold.ttf +0 -0
- package/assets/fonts/TheSun-BoldItalic.ttf +0 -0
- package/assets/fonts/TheSun-HeavyCondensed.ttf +0 -0
- package/assets/fonts/TheSun-HeavyNarrow.ttf +0 -0
- package/assets/fonts/TheSun-Italic.ttf +0 -0
- package/assets/fonts/TheSun-Medium.ttf +0 -0
- package/assets/fonts/TheSun-MediumItalic.ttf +0 -0
- package/assets/fonts/TheSun-Regular.ttf +0 -0
- package/assets/fonts/TimesDigital-Bold.ttf +0 -0
- package/assets/fonts/TimesDigital-BoldItalic.ttf +0 -0
- package/assets/fonts/TimesDigital-BoldSC.ttf +0 -0
- package/assets/fonts/TimesDigital-Italic.ttf +0 -0
- package/assets/fonts/TimesDigital-Regular.ttf +0 -0
- package/assets/fonts/TimesDigital-RegularSC.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Bold.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-BoldItalic.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-BoldSC.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Italic.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Regular.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-RegularSC.ttf +0 -0
- package/assets/fonts/TimesModern-Regular.otf +0 -0
- package/assets/fonts/attribuitions.mdx +35 -0
- package/assets/fonts/bitter-medium.woff +0 -0
- package/assets/fonts/bitter-medium.woff2 +0 -0
- package/assets/fonts/bitter-mediumitalic.woff +0 -0
- package/assets/fonts/bitter-mediumitalic.woff2 +0 -0
- package/assets/fonts/bitter-regular.woff +0 -0
- package/assets/fonts/bitter-regular.woff2 +0 -0
- package/assets/fonts/bitter-semibold.woff +0 -0
- package/assets/fonts/bitter-semibold.woff2 +0 -0
- package/assets/fonts/dmmono-medium.woff +0 -0
- package/assets/fonts/dmmono-medium.woff2 +0 -0
- package/assets/fonts/dmsans-bold-webfont.woff +0 -0
- package/assets/fonts/dmsans-bold-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-bolditalic-webfont.woff +0 -0
- package/assets/fonts/dmsans-bolditalic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-italic-webfont.woff +0 -0
- package/assets/fonts/dmsans-italic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-medium-webfont.woff +0 -0
- package/assets/fonts/dmsans-medium-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-mediumitalic-webfont.woff +0 -0
- package/assets/fonts/dmsans-mediumitalic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-regular-webfont.woff +0 -0
- package/assets/fonts/dmsans-regular-webfont.woff2 +0 -0
- package/assets/fonts/notosans-bold-webfont.woff +0 -0
- package/assets/fonts/notosans-bold-webfont.woff2 +0 -0
- package/assets/fonts/notosans-italic-webfont.woff +0 -0
- package/assets/fonts/notosans-italic-webfont.woff2 +0 -0
- package/assets/fonts/notosans-medium-webfont.woff +0 -0
- package/assets/fonts/notosans-medium-webfont.woff2 +0 -0
- package/assets/fonts/notosans-regular-webfont.woff +0 -0
- package/assets/fonts/notosans-regular-webfont.woff2 +0 -0
- package/assets/fonts/poppins-bold-webfont.woff +0 -0
- package/assets/fonts/poppins-bold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-bolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-bolditalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-extrabold-webfont.woff +0 -0
- package/assets/fonts/poppins-extrabold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-extrabolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-extrabolditalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-italic-webfont.woff +0 -0
- package/assets/fonts/poppins-italic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-light-webfont.woff +0 -0
- package/assets/fonts/poppins-light-webfont.woff2 +0 -0
- package/assets/fonts/poppins-lightitalic-webfont.woff +0 -0
- package/assets/fonts/poppins-lightitalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-medium-webfont.woff +0 -0
- package/assets/fonts/poppins-medium-webfont.woff2 +0 -0
- package/assets/fonts/poppins-mediumitalic-webfont.woff +0 -0
- package/assets/fonts/poppins-mediumitalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-regular-webfont.woff +0 -0
- package/assets/fonts/poppins-regular-webfont.woff2 +0 -0
- package/assets/fonts/poppins-semibold-webfont.woff +0 -0
- package/assets/fonts/poppins-semibold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-semibolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-semibolditalic-webfont.woff2 +0 -0
- package/assets/fonts/source-serif-pro-600.woff +0 -0
- package/assets/fonts/source-serif-pro-600.woff2 +0 -0
- package/assets/fonts/source-serif-pro-600italic.woff +0 -0
- package/assets/fonts/source-serif-pro-600italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-700.woff +0 -0
- package/assets/fonts/source-serif-pro-700.woff2 +0 -0
- package/assets/fonts/source-serif-pro-700italic.woff +0 -0
- package/assets/fonts/source-serif-pro-700italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-italic.woff +0 -0
- package/assets/fonts/source-serif-pro-italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-regular.woff +0 -0
- package/assets/fonts/source-serif-pro-regular.woff2 +0 -0
- package/components/AccountDropdown/AccountDropdown.tsx +65 -0
- package/components/AccountDropdown/__tests__/AcountDropdown.test.tsx +83 -0
- package/components/AccountDropdown/accounts.ts +47 -0
- package/components/AccountDropdown/index.tsx +2 -0
- package/components/AccountDropdown/utils.ts +21 -0
- package/components/ErrorPage/ErrorPage.tsx +135 -0
- package/components/ad/index.tsx +35 -0
- package/components/article/Highlights.tsx +77 -0
- package/components/article/MetaBox.tsx +50 -0
- package/components/article/RelatedArticles.tsx +53 -0
- package/components/article/RelatedTopics.tsx +59 -0
- package/components/article/ShareBarComponent.tsx +53 -0
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1568 -0
- package/components/article/__tests__/index.test.tsx +171 -0
- package/components/article/__tests__/mocks.ts +105 -0
- package/components/article/index.tsx +320 -0
- package/components/common/BackToHomepage.tsx +37 -0
- package/components/common/NavLink.tsx +26 -0
- package/components/common/NewskitLogo.tsx +52 -0
- package/components/common/NewskitLogoShort.tsx +48 -0
- package/components/common/SectionTitleBar.tsx +57 -0
- package/components/common/ShareButton.tsx +18 -0
- package/components/common/ViewMoreButton.tsx +20 -0
- package/components/common/iconNavLink/IconNavLink.tsx +70 -0
- package/components/common/iconNavLink/__tests__/IconNavLink.test.tsx +35 -0
- package/components/common/iconNavLink/index.ts +3 -0
- package/components/common/iconNavLink/types.ts +24 -0
- package/components/common/icons/IconAccount.tsx +13 -0
- package/components/common/icons/IconFilledTwitter.tsx +14 -0
- package/components/common/icons/StyledIconFilledChevronRight.tsx +12 -0
- package/components/footer/__snapshots__/index.test.tsx.snap +192 -0
- package/components/footer/index.test.tsx +13 -0
- package/components/footer/index.tsx +151 -0
- package/components/header/banner-messages.ts +39 -0
- package/components/header/index.tsx +52 -0
- package/components/header/navigation-links.ts +20 -0
- package/components/layout/Gutter.tsx +11 -0
- package/components/layout/LayoutTemplate.tsx +26 -0
- package/components/layout/MainGrid.tsx +66 -0
- package/components/layout/index.tsx +3 -0
- package/components/layout/layoutTypes.ts +13 -0
- package/components/section/ArticleSlice.tsx +35 -0
- package/components/section/CollectionBlock.tsx +54 -0
- package/components/section/SectionContext.tsx +9 -0
- package/components/section/__tests__/ArticleSlice.test.tsx +128 -0
- package/components/section/__tests__/CollectionBlock.test.tsx +83 -0
- package/components/section/__tests__/pageBlock.test.tsx +24 -0
- package/components/section/__tests__/sectionUtils.test.ts +94 -0
- package/components/section/index.tsx +39 -0
- package/components/section/layouts/Block.tsx +79 -0
- package/components/section/layouts/FallBack.tsx +24 -0
- package/components/section/layouts/Lead.tsx +43 -0
- package/components/section/layouts/Rows.tsx +82 -0
- package/components/section/layouts/SectionTitle.tsx +57 -0
- package/components/section/layouts/__tests__/Lead.test.tsx +37 -0
- package/components/section/layouts/__tests__/Rows.test.tsx +40 -0
- package/components/section/layouts/__tests__/SectionTitle.test.tsx +37 -0
- package/components/section/layouts/__tests__/__snapshots__/Lead.test.tsx.snap +180 -0
- package/components/section/layouts/__tests__/__snapshots__/SectionTitle.test.tsx.snap +354 -0
- package/components/section/layouts/gridUtils.ts +21 -0
- package/components/section/layouts/index.tsx +4 -0
- package/components/section/layouts/types.ts +13 -0
- package/components/section/pageBlock.tsx +23 -0
- package/components/section/sectionUtils.ts +61 -0
- package/components/teaser/index.test.tsx +50 -0
- package/components/teaser/index.tsx +64 -0
- package/components/teaser/teaserVariants.ts +33 -0
- package/components/teaser/variant-types.ts +49 -0
- package/components/teaser/variants/featureVariant.ts +42 -0
- package/components/teaser/variants/horizontal.ts +14 -0
- package/components/teaser/variants/titleTeaserVariant.ts +32 -0
- package/components/teaser/variants/titleVertical.ts +24 -0
- package/components/utils/index.test.ts +12 -0
- package/components/utils/index.ts +6 -0
- package/config/__tests__/index.test.ts +54 -0
- package/config/environment.ts +80 -0
- package/config/index.ts +2 -0
- package/config/multiTenancy.ts +11 -0
- package/constants/index.ts +2 -0
- package/context/app-context/AppContext.test.tsx +56 -0
- package/context/app-context/holidayStopListContextOverrides.ts +18 -0
- package/context/app-context/index.tsx +34 -0
- package/context/app-context/paymentMethodContext.tsx +70 -0
- package/context/index.tsx +2 -0
- package/context/multi-tenancy/MultiTenancy.test.tsx +48 -0
- package/context/multi-tenancy/index.tsx +32 -0
- package/css/index.ts +15 -0
- package/cypress/axe/terminal-log.js +19 -0
- package/cypress/config/visual.config.ts +11 -0
- package/cypress/config/visual.skip.config.ts +10 -0
- package/cypress/e2e/account/accessibility.cy.js +88 -0
- package/cypress/e2e/account/banners.cy.js +169 -0
- package/cypress/e2e/account/cancellation.cy.js +219 -0
- package/cypress/e2e/account/holiday-stops.cy.js +109 -0
- package/cypress/e2e/account/main-api.cy.js +102 -0
- package/cypress/e2e/account/newsletters-and-alerts.cy.js +149 -0
- package/cypress/e2e/account/newsletters-page.cy.js +69 -0
- package/cypress/e2e/account/payment-page.cy.js +98 -0
- package/cypress/e2e/account/personal-details.cy.js +1161 -0
- package/cypress/e2e/account/subscription-and-billing.cy.js +434 -0
- package/cypress/e2e/checkout/account-creation.cy.js +8 -0
- package/cypress/e2e/checkout/payment-details.cy.js +19 -0
- package/cypress/e2e/core/home-page.cy.js +6 -0
- package/cypress/e2e/help-hub/accessibility.cy.js +35 -0
- package/cypress/e2e/help-hub/article-page.cy.js +115 -0
- package/cypress/e2e/help-hub/landing-page.cy.js +94 -0
- package/cypress/e2e/help-hub/result-page.cy.js +117 -0
- package/cypress/fixtures/empty.html +10 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/fixtures/holiday-stops.json +40 -0
- package/cypress/fixtures/paymentFailure.js +24 -0
- package/cypress/fixtures/testDates.js +26 -0
- package/cypress/support/commands.js +125 -0
- package/cypress/support/consentValues.js +5839 -0
- package/cypress/support/e2e.js +22 -0
- package/cypress/support/users.js +58 -0
- package/cypress/visual/account/print-visual-regression.cy.js +9 -0
- package/cypress/visual/account/visual-regression.cy.js +40 -0
- package/cypress/visual/empty/empty.cy.js +5 -0
- package/cypress.config.ts +38 -0
- package/helpers/__tests__/getUser.test.ts +45 -0
- package/helpers/__tests__/logger.test.ts +62 -0
- package/helpers/__tests__/useThemeDropdownObject.test.ts +49 -0
- package/helpers/a11y.ts +7 -0
- package/helpers/addCacheHeaders.ts +8 -0
- package/helpers/getUser.ts +37 -0
- package/helpers/getYear.ts +1 -0
- package/helpers/global-types.ts +186 -0
- package/helpers/logger/getWinstonLogger.ts +19 -0
- package/helpers/logger/index.ts +20 -0
- package/helpers/logger/replaceConsoleWithLogger.ts +14 -0
- package/helpers/mocks/articleMock.ts +50 -0
- package/helpers/mocks/getPageMock.ts +369 -0
- package/helpers/mocks/getRadioPostMock.ts +71 -0
- package/helpers/mocks/getRadioPostsMock.ts +26 -0
- package/helpers/mocks/getRecommendationsMock.ts +20 -0
- package/helpers/mocks/index.ts +7 -0
- package/helpers/multiTenancy.ts +19 -0
- package/helpers/setupTests.ts +5 -0
- package/helpers/test-utils.tsx +33 -0
- package/helpers/useThemeDropdownObject.tsx +73 -0
- package/infrastructure/.circleci/config.yml +1187 -0
- package/infrastructure/INFRASTRUCTURE.md +142 -0
- package/infrastructure/build_and_deploy.png +0 -0
- package/infrastructure/helm/Chart.yaml +21 -0
- package/infrastructure/helm/templates/_helpers.tpl +87 -0
- package/infrastructure/helm/templates/deployment.yaml +45 -0
- package/infrastructure/helm/templates/horizontalpodautoscaler.yaml +21 -0
- package/infrastructure/helm/templates/ingress.yaml +31 -0
- package/infrastructure/helm/templates/networkpolicy.yaml +26 -0
- package/infrastructure/helm/templates/secret.yaml +12 -0
- package/infrastructure/helm/templates/service.yaml +15 -0
- package/infrastructure/helm/values-dev.yaml +39 -0
- package/infrastructure/helm/values-local.yaml +30 -0
- package/infrastructure/helm/values-pr.yaml +40 -0
- package/infrastructure/helm/values-prod.yaml +39 -0
- package/infrastructure/helm/values-staging.yaml +39 -0
- package/infrastructure/helm/values.yaml +44 -0
- package/infrastructure/pull_request.png +0 -0
- package/infrastructure/release-documentation-cli.config.json +18 -0
- package/infrastructure/remove_pr.png +0 -0
- package/infrastructure/terraform-ecr/dev.tfvars +3 -0
- package/infrastructure/terraform-ecr/ecr.tf +69 -0
- package/infrastructure/terraform-ecr/main.tf +3 -0
- package/infrastructure/terraform-ecr/variables.tf +19 -0
- package/infrastructure/terraform-ecr/versions.tf +12 -0
- package/infrastructure/terraform-newrelic/alerts.tf +290 -0
- package/infrastructure/terraform-newrelic/dashboards.tf +347 -0
- package/infrastructure/terraform-newrelic/dev.tfvars +3 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-dev.js +53 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-prod.js +54 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-stage.js +54 -0
- package/infrastructure/terraform-newrelic/main.tf +11 -0
- package/infrastructure/terraform-newrelic/monitors.tf +11 -0
- package/infrastructure/terraform-newrelic/prod.tfvars +3 -0
- package/infrastructure/terraform-newrelic/staging.tfvars +3 -0
- package/infrastructure/terraform-newrelic/variables.tf +33 -0
- package/infrastructure/terraform-newrelic/versions.tf +18 -0
- package/jest.config.js +40 -0
- package/jest.config.pact.js +18 -0
- package/newrelic.js +86 -0
- package/next-env.d.ts +5 -0
- package/next.config.js +95 -0
- package/package.json +127 -0
- package/pages/_app.tsx +117 -0
- package/pages/_document.tsx +112 -0
- package/pages/_error.tsx +68 -0
- package/pages/account/add/[field].tsx +34 -0
- package/pages/account/cancellation/index.tsx +22 -0
- package/pages/account/delete/confirm/index.tsx +16 -0
- package/pages/account/delete/error/index.tsx +16 -0
- package/pages/account/delete/index.tsx +16 -0
- package/pages/account/delete/success/index.tsx +16 -0
- package/pages/account/dream-team/index.tsx +19 -0
- package/pages/account/edit/[field].tsx +45 -0
- package/pages/account/family/index.tsx +19 -0
- package/pages/account/holiday-stop/index.tsx +19 -0
- package/pages/account/holiday-stop/previous-holiday-stops.tsx +19 -0
- package/pages/account/holiday-stop/upcoming-holiday-stops.tsx +19 -0
- package/pages/account/index.tsx +33 -0
- package/pages/account/newsletters/index.tsx +19 -0
- package/pages/account/newsletters-and-alerts/index.tsx +24 -0
- package/pages/account/payment/[paymentMethod].tsx +37 -0
- package/pages/account/payment/index.tsx +23 -0
- package/pages/account/payment-methods/index.tsx +21 -0
- package/pages/account/subscription-and-billing/index.tsx +29 -0
- package/pages/api/account/get-session/index.ts +33 -0
- package/pages/api/account/invoice/index.ts +35 -0
- package/pages/api/account/mutate/index.ts +8 -0
- package/pages/api/account/query/index.ts +7 -0
- package/pages/api/auth/[...nextauth].ts +11 -0
- package/pages/api/competitions-sitemap.ts +19 -0
- package/pages/api/feed.ts +23 -0
- package/pages/api/health-check.ts +7 -0
- package/pages/api/news-sitemap.ts +18 -0
- package/pages/api/pages-sitemap.ts +27 -0
- package/pages/api/robots.ts +19 -0
- package/pages/api/sitemap.ts +24 -0
- package/pages/checkout/account-creation/index.tsx +13 -0
- package/pages/checkout/payment-details/index.tsx +10 -0
- package/pages/empty.tsx +6 -0
- package/pages/help-hub/article/[title]/index.tsx +25 -0
- package/pages/help-hub/error.tsx +23 -0
- package/pages/help-hub/index.tsx +51 -0
- package/pages/help-hub/results.tsx +25 -0
- package/pages/index.tsx +19 -0
- package/pages/player/brightcove.tsx +19 -0
- package/pages/rss/create/index.tsx +18 -0
- package/pages/rss/feed/[feedId]/index.tsx +21 -0
- package/pages/rss/index.tsx +18 -0
- package/public/ads.min.js +8175 -0
- package/public/assets/display-base-header.svg +25 -0
- package/public/assets/display-personalDetails-header-sun.svg +55 -0
- package/public/assets/display-personalDetails-header-times.svg +90 -0
- package/public/assets/display-personalDetails-header-vr.svg +46 -0
- package/public/assets/dream-team.svg +10 -0
- package/public/assets/navigationPrimary-brandMark-sun.svg +9 -0
- package/public/assets/navigationPrimary-brandMark-times.svg +18 -0
- package/public/assets/navigationPrimary-brandMark-vr.svg +10 -0
- package/public/assets/newsletters/bestoftimes-101.png +0 -0
- package/public/assets/newsletters/books-115.png +0 -0
- package/public/assets/newsletters/environment-140.png +0 -0
- package/public/assets/newsletters/fashion-108.png +0 -0
- package/public/assets/newsletters/food-106.png +0 -0
- package/public/assets/newsletters/football-111.png +0 -0
- package/public/assets/newsletters/ireland-152.png +0 -0
- package/public/assets/newsletters/law-121.png +0 -0
- package/public/assets/newsletters/money-107.png +0 -0
- package/public/assets/newsletters/moneymentor-150.png +0 -0
- package/public/assets/newsletters/placeholder.png +0 -0
- package/public/assets/newsletters/politics-119.png +0 -0
- package/public/assets/newsletters/property-113.png +0 -0
- package/public/assets/newsletters/puzzles-125.png +0 -0
- package/public/assets/newsletters/scotland-134.png +0 -0
- package/public/assets/newsletters/theatre-127.png +0 -0
- package/public/assets/newsletters/travel-149.png +0 -0
- package/public/assets/newsletters/tv-133.png +0 -0
- package/public/assets/newsletters/us-153.png +0 -0
- package/public/assets/no-subscription.svg +15 -0
- package/public/assets/pending-activation.svg +16 -0
- package/public/assets/personal-details-header.svg +91 -0
- package/public/assets/plchldr150x100.png +0 -0
- package/public/assets/previous-subscription.svg +15 -0
- package/public/assets/primary-navigation-logo-white.svg +6 -0
- package/public/assets/primary-navigation-logo.svg +6 -0
- package/public/assets/tls-logo-white.svg +3 -0
- package/public/favicon.ico +0 -0
- package/public/icon.png +0 -0
- package/public/prebid.min.js +1 -0
- package/queries/getPage.ts +100 -0
- package/queries/getRadioPost.ts +61 -0
- package/queries/getRadioPosts.ts +16 -0
- package/queries/getUserSubscription.ts +9 -0
- package/queries/index.ts +3 -0
- package/scripts/k8s-local.sh +137 -0
- package/scripts/nr-exports.sh +7 -0
- package/temp/_app.tsx +15 -0
- package/temp/_document.tsx +61 -0
- package/temp/app-context-test.tsx +51 -0
- package/temp/app-context.tsx +25 -0
- package/temp/config-index.ts +1 -0
- package/temp/context-index.tsx +1 -0
- package/temp/header.tsx +45 -0
- package/temp/next.config.js +56 -0
- package/tsconfig.json +51 -0
- package/tsconfig.test.json +6 -0
- package/validation/index.tsx +24 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Core infrastructure
|
|
2
|
+
|
|
3
|
+
## ECR docker repo
|
|
4
|
+
|
|
5
|
+
### Description
|
|
6
|
+
|
|
7
|
+
`terraform-ecr` folder contains terraform code that creates an ECR repo in AWS and allows EKS clusters to pull images from it.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
terraform-ecr/
|
|
11
|
+
├── dev.tfvars
|
|
12
|
+
├── ecr.tf
|
|
13
|
+
├── main.tf
|
|
14
|
+
└── variables.tf
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Variables
|
|
18
|
+
|
|
19
|
+
You should already have created an entry in the Service Catalogue for your project. The following info is used to tag the AWS resources:
|
|
20
|
+
|
|
21
|
+
- `<% SERVICE_CATALOGUE_ID >`
|
|
22
|
+
- `<% SERVICE_NAME >`
|
|
23
|
+
- `<% ENVIRONMENT >`
|
|
24
|
+
|
|
25
|
+
`<% PROJECT_NAME >` is used to name the ECR repo and usually is the same as the git repo name
|
|
26
|
+
|
|
27
|
+
## Helm
|
|
28
|
+
|
|
29
|
+
### Description
|
|
30
|
+
|
|
31
|
+
Defines a helm chart for deploying the kubernetes resources needed for the project
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
helm
|
|
35
|
+
├── Chart.yaml
|
|
36
|
+
├── templates
|
|
37
|
+
│ ├── _helpers.tpl
|
|
38
|
+
│ ├── deployment.yaml
|
|
39
|
+
│ ├── horizontalpodautoscaler.yaml
|
|
40
|
+
│ ├── ingress.yaml
|
|
41
|
+
│ ├── networkpolicy.yaml
|
|
42
|
+
│ ├── secret.yaml
|
|
43
|
+
│ └── service.yaml
|
|
44
|
+
├── values-dev.yaml
|
|
45
|
+
├── values-local.yaml
|
|
46
|
+
├── values-pr.yaml
|
|
47
|
+
├── values-prod.yaml
|
|
48
|
+
├── values-staging.yaml
|
|
49
|
+
└── values.yaml
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`templates` folder includes the generalized templates for kubernetes resources and a helpers file defining common variables used in them
|
|
53
|
+
Different values files include specific values for those templates for different environments.
|
|
54
|
+
|
|
55
|
+
### Variables
|
|
56
|
+
|
|
57
|
+
- `<% PROJECT_NAME >` - is used to name the chart and k8s resources and usually is the same as the git repo name
|
|
58
|
+
- `<% REPOSITORY_NAME >` - Name of the repository created with the ECR terraform code
|
|
59
|
+
- `<% SERVICE_NAME >` - Service name from the Service Catalogue
|
|
60
|
+
|
|
61
|
+
## CircleCI
|
|
62
|
+
|
|
63
|
+
### Description
|
|
64
|
+
|
|
65
|
+
Provides a sample CircleCI configuration file.
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
.circleci/
|
|
69
|
+
└── config.yml
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The configuration uses an inline orb to define most of the job needed for a proper build and deploy workflow.
|
|
73
|
+
|
|
74
|
+
There are 3 workflows:
|
|
75
|
+
|
|
76
|
+
- pull_request - should be triggered on on pull requests and create separate environment used by devs for features
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
- remove_pr - remove PR environment after merge
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
- build_and_depoy - main workflow after feature branch merge to build test and deploy the product
|
|
85
|
+
|
|
86
|
+

|
|
87
|
+
|
|
88
|
+
### Variables
|
|
89
|
+
|
|
90
|
+
This configuration relies on getting values from CircleCI contexts. There should be one context per environment in the format: `<% PROJECT_NAME >-<% ENVIRONMENT >`
|
|
91
|
+
|
|
92
|
+
- stage
|
|
93
|
+
- `AWS_ACCESS_KEY_ID` - AWS credentials for EKS cluster
|
|
94
|
+
- `AWS_SECRET_ACCESS_KEY` - AWS credentials for EKS cluster
|
|
95
|
+
- `AWS_EKS_CLUSTER`- name of eks cluster - ceng-eng-dev
|
|
96
|
+
- `AWS_ASSUME_ROLE_ARN` - user role used in EKS cluster
|
|
97
|
+
- `AWS_DEFAULT_REGION` - usually eu-west-1
|
|
98
|
+
- `GIT_EMAIL` - Github user configuration
|
|
99
|
+
- `GIT_USERNAME` - Github user configuration
|
|
100
|
+
- `NEWSKIT_API_ENV_URL` - Newskit API configuration
|
|
101
|
+
- `NEWSKIT_API_X_API_KEY` - Newskit API configuration
|
|
102
|
+
- dev - same as stage plus the following:
|
|
103
|
+
- `AWS_ACCOUNT_ID` - The account id for ECR repo
|
|
104
|
+
- `ECR_AWS_ACCESS_KEY_ID` - AWS credentials for ECR
|
|
105
|
+
- `ECR_AWS_SECRET_ACCESS_KEY` - AWS credentials for ECR
|
|
106
|
+
- `ECR_AWS_ASSUME_ROLE_ARN` - AWS role for ECR
|
|
107
|
+
- `PACT_BROKER_TOKEN` - pact broker configuration
|
|
108
|
+
- `PACT_BROKER_URL` - pact broker configuration
|
|
109
|
+
- prod - same as stage plus the following
|
|
110
|
+
- `BOOK_RELEASE_ROLE_ARN` - AWS IAM role giving access to S3 bucket with release sheet credentials
|
|
111
|
+
- `GIT_ACCESS_TOKEN` - Github personal access token used to created releases
|
|
112
|
+
- `GIT_EMAIL` - Email for user creating releases
|
|
113
|
+
- `GIT_USERNAME` - Username for user creating releases
|
|
114
|
+
- `PRODUCT_OWNER` - Product owner used for releases - needs to be in Remedy on Demand
|
|
115
|
+
- `RELEASE_AWS_ACCESS_KEY_ID` - AWS credentials for release role
|
|
116
|
+
- `RELEASE_AWS_SECRET_ACCESS_KEY` - AWS credentials for release role
|
|
117
|
+
- `SLACK_RELEASES_WEBHOOK` - Webhook for releases slack channel
|
|
118
|
+
|
|
119
|
+
The following placeholders are used in the CircleCI `config.yml` configuration:
|
|
120
|
+
|
|
121
|
+
- `<% HELM_BUCKET_NAME >` - S3 bucket that is going to host helm charts
|
|
122
|
+
- `<% HELM_RELEASE_NAME >` - Name of the helm release. Usually alligns with `<% PROJECT_NAME >`
|
|
123
|
+
- `<% TEAM >`- Used to generate the S3 bucket key i.e. product-platforms
|
|
124
|
+
- `<% PACKAGE_MANAGER >` - package manage i.e. yarn or npm
|
|
125
|
+
- `<% PACKAGE_MANAGER_LOCK_FILE >` - lock file i.e. yarn.lock or package-lock.json
|
|
126
|
+
- `<% PACKAGE_INSTALL >` - install command for package manager
|
|
127
|
+
- `<% PACKAGE_RUN > ` - run command for package manager
|
|
128
|
+
- `<% K8S_NAMESPACE >`- Kubernetes namespace without environment suffix
|
|
129
|
+
- `<% TERRAFORM_FOLDER >` - folder inside the package containing terraform code
|
|
130
|
+
- `<% GIT_REPO` > - URL for the Github repo used in link to release info
|
|
131
|
+
- `<% SSH_KEY `> - Fingerprint for SSH key with write access used by CircleCI
|
|
132
|
+
|
|
133
|
+
## Release-documentation-cli
|
|
134
|
+
|
|
135
|
+
### Description
|
|
136
|
+
|
|
137
|
+
The release-documentation-cli tool is used in NewsUK for automating the release process. Further usage information can be found here: https://github.com/newsuk/release-documentation-cli
|
|
138
|
+
|
|
139
|
+
There is a configuration file that specifies the release details according to the [Release Request Form](https://docs.google.com/forms/d/e/1FAIpQLSc_6O1hWIStREGZOEelg9P5D-kxnZaddStwed1CUx0KxTCjxw/formResponse) that should be in the root of the project/ package: [release-documentation-cli.config.json](./release-documentation-cli.config.json). Check the form for possible values.
|
|
140
|
+
|
|
141
|
+
> [!Note]
|
|
142
|
+
> The `rodConfigurationItemName` and `rodConfigurationItemReconId` need to be created in Remedy on Demand system.
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
apiVersion: v2
|
|
2
|
+
name: <% PROJECT_NAME >
|
|
3
|
+
description: A <% PROJECT_NAME > Helm chart for Kubernetes
|
|
4
|
+
|
|
5
|
+
# A chart can be either an 'application' or a 'library' chart.
|
|
6
|
+
#
|
|
7
|
+
# Application charts are a collection of templates that can be packaged into versioned archives
|
|
8
|
+
# to be deployed.
|
|
9
|
+
#
|
|
10
|
+
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
|
11
|
+
# a dependency of application charts to inject those utilities and functions into the rendering
|
|
12
|
+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
|
13
|
+
type: application
|
|
14
|
+
|
|
15
|
+
# This is the chart version. This version number should be incremented each time you make changes
|
|
16
|
+
# to the chart and its templates, including the app version.
|
|
17
|
+
version: 0.1.3
|
|
18
|
+
|
|
19
|
+
# This is the version number of the application being deployed. This version number should be
|
|
20
|
+
# incremented each time you make changes to the application.
|
|
21
|
+
appVersion: 0.0.2
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{{/* vim: set filetype=mustache: */}}
|
|
2
|
+
{{/*
|
|
3
|
+
Expand the name of the chart.
|
|
4
|
+
*/}}
|
|
5
|
+
{{- define "core.name" -}}
|
|
6
|
+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
7
|
+
{{- end -}}
|
|
8
|
+
|
|
9
|
+
{{/*
|
|
10
|
+
Create a default fully qualified app name.
|
|
11
|
+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
12
|
+
If release name contains chart name it will be used as a full name.
|
|
13
|
+
*/}}
|
|
14
|
+
{{- define "core.fullname" -}}
|
|
15
|
+
{{- if .Values.fullnameOverride -}}
|
|
16
|
+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
|
17
|
+
{{- else -}}
|
|
18
|
+
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
19
|
+
{{- if contains $name .Release.Name -}}
|
|
20
|
+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
|
21
|
+
{{- else -}}
|
|
22
|
+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
|
23
|
+
{{- end -}}
|
|
24
|
+
{{- end -}}
|
|
25
|
+
{{- end -}}
|
|
26
|
+
|
|
27
|
+
{{/*
|
|
28
|
+
Create chart name and version as used by the chart label.
|
|
29
|
+
*/}}
|
|
30
|
+
{{- define "core.chart" -}}
|
|
31
|
+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
|
32
|
+
{{- end -}}
|
|
33
|
+
|
|
34
|
+
{{/*
|
|
35
|
+
Labels
|
|
36
|
+
*/}}
|
|
37
|
+
{{- define "core.labels" -}}
|
|
38
|
+
{{ include "core.selectors" . }}
|
|
39
|
+
{{- if .Chart.AppVersion }}
|
|
40
|
+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
41
|
+
{{- end }}
|
|
42
|
+
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
43
|
+
news.co.uk/service-catalogue-id: {{ .Values.tags.serviceCatalogueId | quote }}
|
|
44
|
+
news.co.uk/service-name: {{ .Values.tags.serviceName }}
|
|
45
|
+
news.co.uk/environment: {{ .Values.environment }}
|
|
46
|
+
{{- end -}}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
{{/*
|
|
51
|
+
Selector labels
|
|
52
|
+
*/}}
|
|
53
|
+
{{- define "core.selectors" -}}
|
|
54
|
+
app.kubernetes.io/name: {{ include "core.name" . }}
|
|
55
|
+
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
56
|
+
{{- end -}}
|
|
57
|
+
|
|
58
|
+
{{- define "core.annotations" -}}
|
|
59
|
+
meta.helm.sh/release-name: {{ .Chart.Name | quote }}
|
|
60
|
+
meta.helm.sh/release-namespace: {{ .Values.namespace | quote }}
|
|
61
|
+
app.kubernetes.io/managed-by: "Helm"
|
|
62
|
+
{{- end }}
|
|
63
|
+
|
|
64
|
+
{{/*
|
|
65
|
+
Annotations for ALB
|
|
66
|
+
*/}}
|
|
67
|
+
{{- define "alb.annotations" -}}
|
|
68
|
+
{{- if ne .Values.environment "local" -}}
|
|
69
|
+
annotations:
|
|
70
|
+
kubernetes.io/ingress.class: alb
|
|
71
|
+
alb.ingress.kubernetes.io/inbound-cidrs: "0.0.0.0/0"
|
|
72
|
+
alb.ingress.kubernetes.io/healthcheck-path: /api/health-check
|
|
73
|
+
alb.ingress.kubernetes.io/healthcheck-interval-seconds: '300'
|
|
74
|
+
alb.ingress.kubernetes.io/scheme: internet-facing
|
|
75
|
+
alb.ingress.kubernetes.io/tags: "Environment={{ .Values.environment }},ServiceName={{ .Values.tags.serviceName }},ServiceCatalogueId={{ .Values.tags.serviceCatalogueId }}"
|
|
76
|
+
alb.ingress.kubernetes.io/certificate-arn: {{ .Values.alb.certificate }}
|
|
77
|
+
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
|
|
78
|
+
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
|
|
79
|
+
{{- if ne .Values.environment "pr" }}
|
|
80
|
+
external-dns.alpha.kubernetes.io/hostname: {{ .Values.alb.hostname }}
|
|
81
|
+
{{- else }}
|
|
82
|
+
alb.ingress.kubernetes.io/group.name: {{ .Values.namespace }}
|
|
83
|
+
external-dns.alpha.kubernetes.io/hostname: {{ .Values.alb.prSuffix }}-{{ .Values.alb.hostname }}
|
|
84
|
+
external-dns.alpha.kubernetes.io/ttl: "60"
|
|
85
|
+
{{- end -}}
|
|
86
|
+
{{- end -}}
|
|
87
|
+
{{- end -}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ include "core.fullname" . }}
|
|
5
|
+
namespace: {{ .Values.namespace }}
|
|
6
|
+
labels: {{ include "core.labels" . | nindent 4 }}
|
|
7
|
+
annotations: {{ include "core.annotations" . | nindent 4 }}
|
|
8
|
+
spec:
|
|
9
|
+
replicas: {{ .Values.replicaCount }}
|
|
10
|
+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
|
11
|
+
selector:
|
|
12
|
+
matchLabels: {{ include "core.selectors" . | nindent 6 }}
|
|
13
|
+
template:
|
|
14
|
+
metadata:
|
|
15
|
+
annotations:
|
|
16
|
+
{{- if eq .Values.environment "pr" }}
|
|
17
|
+
rollme: {{ randAlphaNum 5 }}
|
|
18
|
+
{{- end }}
|
|
19
|
+
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
|
|
20
|
+
labels: {{ include "core.selectors" . | nindent 8 }}
|
|
21
|
+
spec:
|
|
22
|
+
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }}
|
|
23
|
+
containers:
|
|
24
|
+
- name: {{ .Chart.Name }}
|
|
25
|
+
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
|
26
|
+
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
27
|
+
env:
|
|
28
|
+
{{- range $key, $val := .Values.envs }}
|
|
29
|
+
- name: {{ $key }}
|
|
30
|
+
value: {{ $val | quote }}
|
|
31
|
+
{{- end }}
|
|
32
|
+
{{- range $key, $value := .Values.secret.items }}
|
|
33
|
+
- name: {{ $key }}
|
|
34
|
+
valueFrom:
|
|
35
|
+
secretKeyRef:
|
|
36
|
+
name: {{ include "core.fullname" $ }}
|
|
37
|
+
key: {{ $key }}
|
|
38
|
+
{{- end }}
|
|
39
|
+
ports:
|
|
40
|
+
- name: http
|
|
41
|
+
containerPort: {{ .Values.service.port }}
|
|
42
|
+
protocol: TCP
|
|
43
|
+
readinessProbe: {{ toYaml .Values.readinessProbe | nindent 12 }}
|
|
44
|
+
livenessProbe: {{ toYaml .Values.livenessProbe | nindent 12 }}
|
|
45
|
+
resources: {{ toYaml .Values.resources | nindent 12 }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
apiVersion: autoscaling/v2
|
|
2
|
+
kind: HorizontalPodAutoscaler
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ include "core.fullname" . }}-hpa
|
|
5
|
+
namespace: {{ .Values.namespace }}
|
|
6
|
+
labels: {{ include "core.labels" . | nindent 4 }}
|
|
7
|
+
annotations: {{ include "core.annotations" . | nindent 4 }}
|
|
8
|
+
spec:
|
|
9
|
+
scaleTargetRef:
|
|
10
|
+
apiVersion: apps/v1
|
|
11
|
+
kind: Deployment
|
|
12
|
+
name: {{ include "core.fullname" . }}
|
|
13
|
+
minReplicas: {{ .Values.horizontalAutoScale.min }}
|
|
14
|
+
maxReplicas: {{ .Values.horizontalAutoScale.max }}
|
|
15
|
+
metrics:
|
|
16
|
+
- type: Resource
|
|
17
|
+
resource:
|
|
18
|
+
name: {{ .Values.horizontalAutoScale.resource }}
|
|
19
|
+
target:
|
|
20
|
+
type: Utilization
|
|
21
|
+
averageUtilization: {{ .Values.horizontalAutoScale.utilization }}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
apiVersion: networking.k8s.io/v1
|
|
2
|
+
kind: Ingress
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ include "core.fullname" . }}
|
|
5
|
+
namespace: {{ .Values.namespace }}
|
|
6
|
+
{{- include "alb.annotations" . | nindent 2 }}
|
|
7
|
+
labels:
|
|
8
|
+
app: {{ include "core.fullname" . }}
|
|
9
|
+
spec:
|
|
10
|
+
rules:
|
|
11
|
+
{{- if eq .Values.environment "pr" }}
|
|
12
|
+
- host: "{{ .Values.alb.prSuffix}}-{{ .Values.alb.hostname }}"
|
|
13
|
+
http:
|
|
14
|
+
{{- else }}
|
|
15
|
+
- http:
|
|
16
|
+
{{- end }}
|
|
17
|
+
paths:
|
|
18
|
+
- pathType: Prefix
|
|
19
|
+
path: /
|
|
20
|
+
backend:
|
|
21
|
+
service:
|
|
22
|
+
name: ssl-redirect
|
|
23
|
+
port:
|
|
24
|
+
name: use-annotation
|
|
25
|
+
- pathType: Prefix
|
|
26
|
+
path: /
|
|
27
|
+
backend:
|
|
28
|
+
service:
|
|
29
|
+
name: {{ include "core.fullname" . }}
|
|
30
|
+
port:
|
|
31
|
+
number: {{ .Values.service.port }}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{{- if .Values.networkpolicy.enabled -}}
|
|
2
|
+
{{- $fullName := include "core.fullname" . -}}
|
|
3
|
+
apiVersion: networking.k8s.io/v1
|
|
4
|
+
kind: NetworkPolicy
|
|
5
|
+
metadata:
|
|
6
|
+
name: {{ $fullName }}-allowed-traffic
|
|
7
|
+
namespace: {{ .Values.namespace }}
|
|
8
|
+
labels: {{ include "core.labels" . | nindent 4 }}
|
|
9
|
+
annotations: {{ include "core.annotations" . | nindent 4 }}
|
|
10
|
+
spec:
|
|
11
|
+
podSelector:
|
|
12
|
+
matchExpressions :
|
|
13
|
+
- key: app.kubernetes.io/name
|
|
14
|
+
operator: In
|
|
15
|
+
values:
|
|
16
|
+
- {{ include "core.name" . }}
|
|
17
|
+
ingress:
|
|
18
|
+
- ports:
|
|
19
|
+
- port: {{ .Values.service.port }}
|
|
20
|
+
protocol: TCP
|
|
21
|
+
egress:
|
|
22
|
+
- {}
|
|
23
|
+
policyTypes:
|
|
24
|
+
- Ingress
|
|
25
|
+
- Egress
|
|
26
|
+
{{- end }}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
apiVersion: v1
|
|
2
|
+
kind: Secret
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ include "core.fullname" . }}
|
|
5
|
+
namespace: {{ .Values.namespace }}
|
|
6
|
+
labels: {{ include "core.labels" . | nindent 4 }}
|
|
7
|
+
annotations: {{ include "core.annotations" . | nindent 4 }}
|
|
8
|
+
type: Opaque
|
|
9
|
+
data:
|
|
10
|
+
{{- range $key, $value := .Values.secret.items }}
|
|
11
|
+
{{ $key }}: {{ $value | toString | b64enc | quote }}
|
|
12
|
+
{{- end }}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
apiVersion: v1
|
|
2
|
+
kind: Service
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ include "core.fullname" . }}
|
|
5
|
+
namespace: {{ .Values.namespace }}
|
|
6
|
+
labels: {{ include "core.labels" . | nindent 4 }}
|
|
7
|
+
annotations: {{ include "core.annotations" . | nindent 4 }}
|
|
8
|
+
spec:
|
|
9
|
+
type: {{ .Values.service.type }}
|
|
10
|
+
ports:
|
|
11
|
+
- port: {{ .Values.service.port }}
|
|
12
|
+
targetPort: {{ .Values.service.port }}
|
|
13
|
+
protocol: TCP
|
|
14
|
+
name: http
|
|
15
|
+
selector: {{ include "core.selectors" . | nindent 4 }}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Default values for NewsKit Render.
|
|
2
|
+
# This is a YAML-formatted file.
|
|
3
|
+
# Declare variables to be passed into your templates.
|
|
4
|
+
namespace: <% PROJECT_NAME >-dev
|
|
5
|
+
|
|
6
|
+
replicaCount: 1
|
|
7
|
+
revisionHistoryLimit: 3
|
|
8
|
+
|
|
9
|
+
envs:
|
|
10
|
+
NEWSKIT_API_ENV_URL: 'https://newskit.dev.newsapis.co.uk/graphql'
|
|
11
|
+
PUBLISHER: ''
|
|
12
|
+
TITLE: ''
|
|
13
|
+
SITEMAP_PUBLICATION_NAME: ''
|
|
14
|
+
SITEMAP_FIRST_PUBLICATION_DATE: ''
|
|
15
|
+
TWITTER_USERNAME: ''
|
|
16
|
+
GSC_ID: ''
|
|
17
|
+
NEW_RELIC_APP_NAME: '<% PROJECT_PREFIX >:<% PROJECT_NAME >:dev'
|
|
18
|
+
NEW_RELIC_ENABLED: true
|
|
19
|
+
|
|
20
|
+
resources:
|
|
21
|
+
limits:
|
|
22
|
+
cpu: 1
|
|
23
|
+
memory: 512Mi
|
|
24
|
+
requests:
|
|
25
|
+
cpu: 200m
|
|
26
|
+
memory: 256Mi
|
|
27
|
+
|
|
28
|
+
environment: dev
|
|
29
|
+
|
|
30
|
+
alb:
|
|
31
|
+
certificate: arn:aws:acm:eu-west-1:720262317718:certificate/eb7cf157-d5c3-4d6a-9c2c-70714526a653
|
|
32
|
+
# needs to work with external-dns in EKS cluster
|
|
33
|
+
hostname: <% PROJECT_NAME >.ceng-dev.newsuk.tech
|
|
34
|
+
|
|
35
|
+
horizontalAutoScale:
|
|
36
|
+
min: 1
|
|
37
|
+
max: 2
|
|
38
|
+
resource: cpu
|
|
39
|
+
utilization: 60
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Default values for NewsKit Render.
|
|
2
|
+
# This is a YAML-formatted file.
|
|
3
|
+
# Declare variables to be passed into your templates.
|
|
4
|
+
namespace: <% PROJECT_NAME >-local
|
|
5
|
+
|
|
6
|
+
replicaCount: 1
|
|
7
|
+
revisionHistoryLimit: 3
|
|
8
|
+
|
|
9
|
+
imagePullSecrets:
|
|
10
|
+
- name: regcred
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
envs:
|
|
14
|
+
NEWSKIT_API_ENV_URL: "https://newskit.dev.newsapis.co.uk/graphql"
|
|
15
|
+
|
|
16
|
+
resources:
|
|
17
|
+
limits:
|
|
18
|
+
cpu: 1
|
|
19
|
+
memory: 512Mi
|
|
20
|
+
requests:
|
|
21
|
+
cpu: 200m
|
|
22
|
+
memory: 256Mi
|
|
23
|
+
|
|
24
|
+
environment: local
|
|
25
|
+
|
|
26
|
+
horizontalAutoScale:
|
|
27
|
+
min: 1
|
|
28
|
+
max: 2
|
|
29
|
+
resource: cpu
|
|
30
|
+
utilization: 60
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Default values for NewsKit Render.
|
|
2
|
+
# This is a YAML-formatted file.
|
|
3
|
+
# Declare variables to be passed into your templates.
|
|
4
|
+
namespace: <% PROJECT_NAME >-pr
|
|
5
|
+
|
|
6
|
+
replicaCount: 1
|
|
7
|
+
revisionHistoryLimit: 3
|
|
8
|
+
|
|
9
|
+
envs:
|
|
10
|
+
NEWSKIT_API_ENV_URL: 'https://newskit.dev.newsapis.co.uk/graphql'
|
|
11
|
+
PUBLISHER: ''
|
|
12
|
+
TITLE: ''
|
|
13
|
+
SITEMAP_PUBLICATION_NAME: ''
|
|
14
|
+
SITEMAP_FIRST_PUBLICATION_DATE: ''
|
|
15
|
+
TWITTER_USERNAME: ''
|
|
16
|
+
GSC_ID: ''
|
|
17
|
+
NEW_RELIC_APP_NAME: '<% PROJECT_PREFIX >:<% PROJECT_NAME >:dev'
|
|
18
|
+
NEW_RELIC_ENABLED: false
|
|
19
|
+
|
|
20
|
+
resources:
|
|
21
|
+
limits:
|
|
22
|
+
cpu: 1
|
|
23
|
+
memory: 512Mi
|
|
24
|
+
requests:
|
|
25
|
+
cpu: 200m
|
|
26
|
+
memory: 256Mi
|
|
27
|
+
|
|
28
|
+
environment: pr
|
|
29
|
+
|
|
30
|
+
alb:
|
|
31
|
+
certificate: arn:aws:acm:eu-west-1:720262317718:certificate/eb7cf157-d5c3-4d6a-9c2c-70714526a653
|
|
32
|
+
# needs to work with external-dns in EKS cluster
|
|
33
|
+
hostname: <% PROJECT_NAME >.ceng-dev.newsuk.tech
|
|
34
|
+
prSuffix: ''
|
|
35
|
+
|
|
36
|
+
horizontalAutoScale:
|
|
37
|
+
min: 1
|
|
38
|
+
max: 2
|
|
39
|
+
resource: cpu
|
|
40
|
+
utilization: 60
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Default values for NewsKit Render.
|
|
2
|
+
# This is a YAML-formatted file.
|
|
3
|
+
# Declare variables to be passed into your templates.
|
|
4
|
+
namespace: <% PROJECT_NAME >-prod
|
|
5
|
+
|
|
6
|
+
replicaCount: 2
|
|
7
|
+
revisionHistoryLimit: 5
|
|
8
|
+
|
|
9
|
+
envs:
|
|
10
|
+
NEWSKIT_API_ENV_URL: 'https://newskit.newsapis.co.uk/graphql'
|
|
11
|
+
PUBLISHER: ''
|
|
12
|
+
TITLE: ''
|
|
13
|
+
SITEMAP_PUBLICATION_NAME: ''
|
|
14
|
+
SITEMAP_FIRST_PUBLICATION_DATE: ''
|
|
15
|
+
TWITTER_USERNAME: ''
|
|
16
|
+
GSC_ID: ''
|
|
17
|
+
NEW_RELIC_APP_NAME: '<% PROJECT_PREFIX >:<% PROJECT_NAME >:prod'
|
|
18
|
+
NEW_RELIC_ENABLED: true
|
|
19
|
+
|
|
20
|
+
resources:
|
|
21
|
+
limits:
|
|
22
|
+
cpu: 1
|
|
23
|
+
memory: 512Mi
|
|
24
|
+
requests:
|
|
25
|
+
cpu: 200m
|
|
26
|
+
memory: 256Mi
|
|
27
|
+
|
|
28
|
+
environment: prod
|
|
29
|
+
|
|
30
|
+
alb:
|
|
31
|
+
certificate: arn:aws:acm:eu-west-1:474887192380:certificate/ec49c52e-1347-4150-a577-276b397f2c53
|
|
32
|
+
# needs to work with external-dns in EKS cluster
|
|
33
|
+
hostname: <% PROJECT_NAME >.prod.ceng.newsuk.tech
|
|
34
|
+
|
|
35
|
+
horizontalAutoScale:
|
|
36
|
+
min: 2
|
|
37
|
+
max: 4
|
|
38
|
+
resource: cpu
|
|
39
|
+
utilization: 60
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Default values for NewsKit Render.
|
|
2
|
+
# This is a YAML-formatted file.
|
|
3
|
+
# Declare variables to be passed into your templates.
|
|
4
|
+
namespace: <% PROJECT_NAME >-staging
|
|
5
|
+
|
|
6
|
+
replicaCount: 2
|
|
7
|
+
revisionHistoryLimit: 5
|
|
8
|
+
|
|
9
|
+
envs:
|
|
10
|
+
NEWSKIT_API_ENV_URL: 'https://newskit.staging.newsapis.co.uk/graphql'
|
|
11
|
+
PUBLISHER: ''
|
|
12
|
+
TITLE: ''
|
|
13
|
+
SITEMAP_PUBLICATION_NAME: ''
|
|
14
|
+
SITEMAP_FIRST_PUBLICATION_DATE: ''
|
|
15
|
+
TWITTER_USERNAME: ''
|
|
16
|
+
GSC_ID: ''
|
|
17
|
+
NEW_RELIC_APP_NAME: '<% PROJECT_PREFIX >:<% PROJECT_NAME >:staging'
|
|
18
|
+
NEW_RELIC_ENABLED: true
|
|
19
|
+
|
|
20
|
+
resources:
|
|
21
|
+
limits:
|
|
22
|
+
cpu: 1
|
|
23
|
+
memory: 512Mi
|
|
24
|
+
requests:
|
|
25
|
+
cpu: 200m
|
|
26
|
+
memory: 256Mi
|
|
27
|
+
|
|
28
|
+
environment: staging
|
|
29
|
+
|
|
30
|
+
alb:
|
|
31
|
+
certificate: arn:aws:acm:eu-west-1:033746730321:certificate/ba403625-cb5d-4bad-af6e-3dc1a452937b
|
|
32
|
+
# needs to work with external-dns in EKS cluster
|
|
33
|
+
hostname: <% PROJECT_NAME >.staging.ceng.newsuk.tech
|
|
34
|
+
|
|
35
|
+
horizontalAutoScale:
|
|
36
|
+
min: 2
|
|
37
|
+
max: 4
|
|
38
|
+
resource: cpu
|
|
39
|
+
utilization: 60
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
image:
|
|
2
|
+
repository: <% REPOSITORY_NAME >
|
|
3
|
+
tag: ""
|
|
4
|
+
pullPolicy: Always
|
|
5
|
+
|
|
6
|
+
imagePullSecrets: []
|
|
7
|
+
nameOverride: ""
|
|
8
|
+
fullnameOverride: ""
|
|
9
|
+
|
|
10
|
+
service:
|
|
11
|
+
type: NodePort
|
|
12
|
+
port: 3000
|
|
13
|
+
|
|
14
|
+
tags:
|
|
15
|
+
serviceCatalogueId: <% SERVICE_CATALOGUE_ID >
|
|
16
|
+
serviceName: <% SERVICE_NAME >
|
|
17
|
+
|
|
18
|
+
envs:
|
|
19
|
+
NODE_ENV: prod
|
|
20
|
+
|
|
21
|
+
secret:
|
|
22
|
+
items:
|
|
23
|
+
{}
|
|
24
|
+
|
|
25
|
+
networkpolicy:
|
|
26
|
+
enabled: true
|
|
27
|
+
annotations: {}
|
|
28
|
+
|
|
29
|
+
# Health check endpoint
|
|
30
|
+
readinessProbe:
|
|
31
|
+
httpGet:
|
|
32
|
+
path: /api/health-check
|
|
33
|
+
port: 3000
|
|
34
|
+
initialDelaySeconds: 5
|
|
35
|
+
periodSeconds: 1
|
|
36
|
+
|
|
37
|
+
livenessProbe:
|
|
38
|
+
httpGet:
|
|
39
|
+
path: /api/health-check
|
|
40
|
+
port: 3000
|
|
41
|
+
initialDelaySeconds: 5
|
|
42
|
+
timeoutSeconds: 2
|
|
43
|
+
periodSeconds: 3
|
|
44
|
+
failureThreshold: 5
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gitConfigPath": ".git/config",
|
|
3
|
+
"releaseDetails": {
|
|
4
|
+
"emailAddress": "<sample_email@news.co.uk>",
|
|
5
|
+
"title": "<Sample Project>",
|
|
6
|
+
"platform": "<Sample Platform>",
|
|
7
|
+
"osType": "<sample OS>",
|
|
8
|
+
"partner": "<sample Partner>",
|
|
9
|
+
"priority": "<sample priority>",
|
|
10
|
+
"businessJustification": "<sample justification>",
|
|
11
|
+
"testingMethod": "<sample testing method>",
|
|
12
|
+
"testingToolsUsed": "<sample testing tools>",
|
|
13
|
+
"releaseDurationMinutes": 15,
|
|
14
|
+
"rodConfigurationItemName": "<rod item>",
|
|
15
|
+
"rodConfigurationItemReconId": "<rod recon id>"
|
|
16
|
+
},
|
|
17
|
+
"localChangelogPath": "./CHANGELOG.md"
|
|
18
|
+
}
|
|
Binary file
|