-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from OpenShiftDemos/production
Move production to main branch
- Loading branch information
Showing
108 changed files
with
1,393 additions
and
990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
resources: | ||
- rolloutmanager.yaml |
4 changes: 2 additions & 2 deletions
4
.../user/templates/prod/rollout-manager.yaml → ...rollouts-manager/base/rolloutmanager.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: RolloutManager | ||
metadata: | ||
name: argo-rollout | ||
namespace: user{{ .Values.user }}-prod | ||
name: cluster | ||
namespace: openshift-gitops | ||
spec: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: argo-rollouts-workshop | ||
title: Argo Rollouts Workshop | ||
version: main | ||
nav: | ||
- modules/ROOT/nav.adoc | ||
|
||
start_page: ROOT:index.adoc | ||
|
||
asciidoc: | ||
attributes: | ||
page-pagination: true | ||
page-links: | ||
- url: https://redhat.com | ||
text: Red Hat | ||
- url: https://docs.openshift.com/gitops | ||
text: OpenShift GitOps | ||
- url: https://argoproj.github.io/rollouts | ||
text: Argo Rollouts | ||
console_url: URL_PLACEHOLDER | ||
login_command: LOGIN_COMMAND_PLACEHOLDER | ||
openshift_cluster_ingress_domain: OPENSHIFT_CLUSTER_INGRESS_DOMAIN_PLACEHOLDER | ||
password: PASSWORD_PLACEHOLDER | ||
user: USER_PLACEHOLDER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
'use strict' | ||
|
||
module.exports.register = function ({ config }) { | ||
this.once('contentClassified', ({ playbook, contentCatalog }) => { | ||
var pageDetails = {} | ||
console.log('site-wide attributes (as defined in playbook)') | ||
console.log(playbook.asciidoc.attributes) | ||
let fileContents = "== Site Wide Attributes\n\n" | ||
fileContents += `${playbook.asciidoc.attributes || {}}\n` | ||
contentCatalog.getComponents().forEach((component) => { | ||
component.versions.forEach((componentVersion) => { | ||
getUniqueOrigins(contentCatalog, componentVersion).forEach((origin) => { | ||
console.log(`${componentVersion.version}@${componentVersion.name} attributes (as defined in antora.yml)`) | ||
pageDetails = { version: `${componentVersion.version}`, name: `${componentVersion.name}` } | ||
console.log(origin.descriptor.asciidoc?.attributes || {}) | ||
fileContents += `== Component Wide Attributes\n\n` | ||
fileContents += `Antora component version@name: \`${componentVersion.version}@${componentVersion.name}\`\n\n` | ||
fileContents += `[source,json]\n----\n` | ||
fileContents += JSON.stringify(origin.descriptor.asciidoc?.attributes || {}, null, 2) | ||
fileContents += `\n----\n` | ||
}) | ||
}) | ||
}) | ||
const newPage = contentCatalog.addFile({ | ||
contents: Buffer.from('= Attributes Page\n\nTo disable Dev Mode (this page) comment out the dev-mode.js extenion in the playbook (usually default-site.yml)\n\n' + fileContents), | ||
path: 'modules/ROOT/pages/attrs-page.adoc', | ||
src: { | ||
path: 'modules/ROOT/pages/attrs-page.adoc', | ||
component: pageDetails.name, | ||
version: pageDetails.version, | ||
// component: pageDetails.name || 'modules', | ||
// version: pageDetails.version || 'master', | ||
module: 'ROOT', | ||
family: 'page', | ||
relative: 'attrs-page.adoc', | ||
}, | ||
}) | ||
}) | ||
// add new page to navigation | ||
this.on('navigationBuilt', ({ contentCatalog }) => { | ||
const { addToNavigation = true, devPagesHeading = 'Dev Mode' } = config | ||
const logger = this.getLogger('dev-pages-extension') | ||
contentCatalog.getComponents().forEach(({ versions }) => { | ||
versions.forEach(({ name: component, version, navigation: nav, url: defaultUrl }) => { | ||
const navEntriesByUrl = getNavEntriesByUrl(nav) | ||
const unlistedPages = contentCatalog | ||
.findBy({ component, version, family: 'page' }) | ||
.filter((page) => page.out) | ||
.reduce((collector, page) => { | ||
if ((page.pub.url in navEntriesByUrl) || page.pub.url === defaultUrl) return collector | ||
// logger.warn({ file: page.src, source: page.src.origin }, 'detected unlisted dev page') | ||
return collector.concat(page) | ||
}, []) | ||
if (unlistedPages.length && addToNavigation) { | ||
nav.push({ | ||
content: devPagesHeading, | ||
items: unlistedPages.map((page) => { | ||
// logger.warn({ content: page, url: page.pub.url }, 'unlisted dev page details') | ||
const navtitle = page.asciidoc.navtitle || page.src.stem | ||
return { content: navtitle, url: page.pub.url, urlType: 'internal' } | ||
}), | ||
root: true, | ||
}) | ||
} | ||
}) | ||
}) | ||
}) | ||
} | ||
|
||
function getUniqueOrigins (contentCatalog, componentVersion) { | ||
return contentCatalog.findBy({ component: componentVersion.name, version: componentVersion.version }) | ||
.reduce((origins, file) => { | ||
const origin = file.src.origin | ||
if (origin && !origins.includes(origin)) origins.push(origin) | ||
return origins | ||
}, []) | ||
} | ||
|
||
function getNavEntriesByUrl (items = [], accum = {}) { | ||
items.forEach((item) => { | ||
if (item.urlType === 'internal') accum[item.url.split('#')[0]] = item | ||
getNavEntriesByUrl(item.items, accum) | ||
}) | ||
return accum | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+448 KB
content/modules/ROOT/assets/images/rollouts-demo-service-preview-diagram.png
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.