Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions calico-cloud/variables.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const releases = require('./releases.json');
import releases from './releases.json';

const variables = {
releaseTitle: 'v3.19.0-1.0',
Expand Down Expand Up @@ -27,4 +27,4 @@ const variables = {
},
};

module.exports = variables;
export default variables;
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';
import CodeBlock from '@theme/CodeBlock';
import Heading from '@theme/Heading';

import { prodname, baseUrl } from '../../variables';
import variables from '@site/calico_versioned_docs/version-3.26/variables';

export default function AutoHostendpointsMigrate(props) {
return (
Expand All @@ -20,12 +19,12 @@ export default function AutoHostendpointsMigrate(props) {
Auto host endpoints have an allow-all profile attached which allows all traffic in the absence of network
policy. This may result in unexpected behavior and data.
</Admonition>
<p>In order to migrate existing all-interfaces host endpoints to {prodname}-managed auto host endpoints:</p>
<p>In order to migrate existing all-interfaces host endpoints to {variables.prodname}-managed auto host endpoints:</p>
<ol>
<li>
<p>
Add any labels on existing all-interfaces host endpoints to their corresponding {props.orch} nodes.{' '}
{prodname} manages labels on automatic host endpoints by syncing labels from their nodes. Any labels on
{variables.prodname} manages labels on automatic host endpoints by syncing labels from their nodes. Any labels on
existing all-interfaces host endpoints should be added to their respective nodes. For example, if your
existing all-interface host endpoint for node <strong>node1</strong> has the label{' '}
<strong>environment: dev</strong>, then you must add that same label to its node:
Expand All @@ -39,7 +38,7 @@ export default function AutoHostendpointsMigrate(props) {
<li>
<p>
Enable auto host endpoints by following the{' '}
<Link href={`${baseUrl}/network-policy/hosts/kubernetes-nodes#enable-automatic-host-endpoints`}>
<Link href={`${variables.baseUrl}/network-policy/hosts/kubernetes-nodes#enable-automatic-host-endpoints`}>
enable automatic host endpoints how-to guide
</Link>
. Note that automatic host endpoints are created with a profile attached that allows all traffic in the
Expand All @@ -52,7 +51,7 @@ export default function AutoHostendpointsMigrate(props) {
</li>
<li>
<p>
Delete old all-interfaces host endpoints. You can distinguish host endpoints managed by {prodname} from
Delete old all-interfaces host endpoints. You can distinguish host endpoints managed by {variables.prodname} from
others in several ways. First, automatic host endpoints have the label{' '}
<strong>projectcalico.org/created-by: calico-kube-controllers</strong>. Secondly, automatic host
endpoints&#39; name have the suffix <strong>-auto-hep</strong>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ import React from 'react';

import Admonition from '@theme/Admonition';
import CodeBlock from '@theme/CodeBlock';

import { prodname, prodnameWindows, manifestsUrl } from '../../variables';
import variables from '@site/calico_versioned_docs/version-3.26/variables';

function CalicoWindowsInstallFirstStep(props) {
if (props.networkingType === 'vxlan') {
return (
<li>
Ensure that BGP is disabled.
<ul>
<li>If you installed {prodname} using the manifest, BGP is already disabled.</li>
<li>If you installed {prodname} using the operator, run this command:</li>
<li>If you installed {variables.prodname} using the manifest, BGP is already disabled.</li>
<li>If you installed {variables.prodname} using the operator, run this command:</li>
<br />
<CodeBlock language='bash'>
{`kubectl patch installation default --type=merge -p '{"spec": {"calicoNetwork": {"bgp": "Disabled"}}}'`}
Expand Down Expand Up @@ -52,18 +51,18 @@ export default function CalicoWindowsInstall(props) {
<ol>
<CalicoWindowsInstallFirstStep {...props} />
<li>
<p>Download the {prodnameWindows} installation manifest.</p>
<p>Download the {variables.prodnameWindows} installation manifest.</p>
<CodeBlock language='bash'>
{props.networkingType === 'vxlan'
? `curl ${manifestsUrl}/manifests/calico-windows-vxlan.yaml -o calico-windows.yaml`
: `curl ${manifestsUrl}/manifests/calico-windows-bgp.yaml -o calico-windows.yaml`}
? `curl ${variables.manifestsUrl}/manifests/calico-windows-vxlan.yaml -o calico-windows.yaml`
: `curl ${variables.manifestsUrl}/manifests/calico-windows-bgp.yaml -o calico-windows.yaml`}
</CodeBlock>
</li>
<li>
<p>
Get the cluster's Kubernetes API server host and port, which will be used to update the {prodnameWindows}{' '}
config map. The API server host and port is required so that the {prodnameWindows} installation script can
create a kubeconfig file for {prodname} services. If your Windows nodes already have {prodnameWindows}{' '}
Get the cluster's Kubernetes API server host and port, which will be used to update the {variables.prodnameWindows}{' '}
config map. The API server host and port is required so that the {variables.prodnameWindows} installation script can
create a kubeconfig file for {variables.prodname} services. If your Windows nodes already have {variables.prodnameWindows}{' '}
installed manually, skip this step. The installation script will use the API server host and port from your
node's existing kubeconfig file if the <code>KUBERNETES_SERVICE_HOST</code> and{' '}
<code>KUBERNETES_SERVICE_PORT</code> variables are not provided in the <code>calico-windows-config</code>{' '}
Expand Down Expand Up @@ -163,7 +162,7 @@ kubernetes 172.16.101.157:6443 40m`}
</ul>
</li>
<li>
<p>Apply the {prodnameWindows} installation manifest.</p>
<p>Apply the {variables.prodnameWindows} installation manifest.</p>
<CodeBlock language='bash'>kubectl create -f calico-windows.yaml</CodeBlock>
</li>
<li>
Expand All @@ -173,7 +172,7 @@ kubernetes 172.16.101.157:6443 40m`}
</CodeBlock>
<p>
After the log <code>Calico for Windows installed</code> appears, installation is complete. Next, the{' '}
{prodnameWindows} services are started in separate containers:
{variables.prodnameWindows} services are started in separate containers:
</p>
<CodeBlock language='bash'>
kubectl logs -f -n calico-system -l k8s-app=calico-node-windows -c node{'\n'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Link from '@docusaurus/Link';

import { prodname, baseUrl } from '../../variables';
import variables from '@site/calico_versioned_docs/version-3.26/variables';

export default function EnvironmentFile(props) {
if (props.target === 'felix') {
Expand All @@ -31,9 +30,9 @@ export default function EnvironmentFile(props) {
host. For more help, see the{' '}
</span>
{props.install === 'container' ? (
<Link href={`${baseUrl}/reference/configure-calico-node`}>{props.nodecontainer} configuration reference</Link>
<Link href={`${variables.baseUrl}/reference/configure-calico-node`}>{props.nodecontainer} configuration reference</Link>
) : (
<Link href={`${baseUrl}/reference/felix/configuration`}>Felix configuration reference</Link>
<Link href={`${variables.baseUrl}/reference/felix/configuration`}>Felix configuration reference</Link>
)}
</p>
<Tabs>
Expand Down Expand Up @@ -139,9 +138,9 @@ export default function EnvironmentFile(props) {
<tr>
<td>CALICO_IP or CALICO_IP6</td>
<td>
If values are not specified for both, {prodname} uses the currently-configured values for the next hop
If values are not specified for both, {variables.prodname} uses the currently-configured values for the next hop
IP addresses for this node—these can be configured through the Node resource. If no next hop addresses
are configured, {prodname} automatically determines an IPv4 next hop address by querying the host
are configured, {variables.prodname} automatically determines an IPv4 next hop address by querying the host
interfaces (and configures this value in the Node resource). You can set CALICO_IP to{' '}
<code>autodetect</code> for force auto-detection of IP address every time the node starts. If you set
IP addresses through these environment variables, it reconfigures any values currently set through the
Expand All @@ -151,7 +150,7 @@ export default function EnvironmentFile(props) {
<tr>
<td>CALICO_AS</td>
<td>
If not specified, {prodname} uses the currently configured value for the AS Number for the node BGP
If not specified, {variables.prodname} uses the currently configured value for the AS Number for the node BGP
client—this can be configured through the Node resource. If the Node resource value is not set, Calico
inherits the AS Number from the global default value. If you set a value through this environment
variable, it reconfigures any value currently set through the Node resource.
Expand All @@ -160,7 +159,7 @@ export default function EnvironmentFile(props) {
<tr>
<td>NO_DEFAULT_POOLS</td>
<td>
Set to true to prevent {prodname} from creating a default pool if one does not exist. Pools are used
Set to true to prevent {variables.prodname} from creating a default pool if one does not exist. Pools are used
for workload endpoints and not required for non-cluster hosts.
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';
import Admonition from '@theme/Admonition';
import CodeBlock from '@theme/CodeBlock';
import Heading from '@theme/Heading';

import { prodname, version } from '../../variables';
import variables from '@site/calico_versioned_docs/version-3.26/variables';

export default function HostEndpointsUpgrade(props) {
return (
Expand All @@ -19,7 +18,7 @@ export default function HostEndpointsUpgrade(props) {
upgrading. Failure to do so will result in an outage.
</Admonition>
<p>
In versions of {prodname} prior to v3.14, all-interfaces host endpoints (host endpoints with{' '}
In versions of {variables.prodname} prior to v3.14, all-interfaces host endpoints (host endpoints with{' '}
<code>interfaceName: *</code>) only supported pre-DNAT policy. The default behavior of all-interfaces host
endpoints, in the absence of any policy, was to allow all traffic.
</p>
Expand All @@ -31,7 +30,7 @@ export default function HostEndpointsUpgrade(props) {
endpoints drop traffic in the absence of policy.
</p>
<p>
Before upgrading to {version}, you must ensure that global network policies are in place that select existing
Before upgrading to {variables.version}, you must ensure that global network policies are in place that select existing
all-interfaces host endpoints and explicitly allow existing traffic flows. As a starting point, you can create
an allow-all policy that selects existing all-interfaces host endpoints. First, we&#39;ll add a label to the
existing host endpoints. Get a list of the nodes that have an all-interfaces host endpoint:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import React from 'react';

import CodeBlock from '@theme/CodeBlock';

import { prodname, releaseTitle, calicoReleasesURL } from '../../variables';
import variables from '@site/calico_versioned_docs/version-3.26/variables';

export default function InstallOpenShiftManifests() {
return (
<>
<p>Download the {prodname} manifests for OpenShift and add them to the generated manifests directory:</p>
<p>Download the {variables.prodname} manifests for OpenShift and add them to the generated manifests directory:</p>
<CodeBlock id='data-install-openshift-manifests' language='bash'>
{`mkdir calico
wget -qO- ${calicoReleasesURL}/${releaseTitle}/ocp.tgz | tar xvz --strip-components=1 -C calico
wget -qO- ${variables.calicoReleasesURL}/${variables.releaseTitle}/ocp.tgz | tar xvz --strip-components=1 -C calico
cp calico/* manifests/`}
</CodeBlock>
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Temporary component for "calico\maintenance\image-options\alternate-registry.mdx"

import React from 'react';

import CodeBlock from '@theme/CodeBlock';

import { imageNames, prodname, registry, releases, tigeraOperator } from '../../variables';
import variables from '../../variables';

export default function MaintenanceImageOptionsAlternateRegistry() {
const cmds1 = renderInstallCommands(
Expand All @@ -23,10 +21,10 @@ export default function MaintenanceImageOptionsAlternateRegistry() {
return (
<ol>
<li>
<p>Use the following commands to pull the required {prodname} images.</p>
<p>Use the following commands to pull the required {variables.prodname} images.</p>
</li>
<CodeBlock language='bash'>
docker pull {tigeraOperator.registry}/{tigeraOperator.image}:{tigeraOperator.version}
docker pull {variables.tigeraOperator.registry}/{variables.tigeraOperator.image}:{variables.tigeraOperator.version}
{'\n'}
{cmds1}
</CodeBlock>
Expand All @@ -36,16 +34,16 @@ export default function MaintenanceImageOptionsAlternateRegistry() {
</p>
</li>
<CodeBlock language='bash'>
docker tag {tigeraOperator.registry}/{tigeraOperator.image}:{tigeraOperator.version} $REGISTRY/
{tigeraOperator.image}:{tigeraOperator.version}
docker tag {variables.tigeraOperator.registry}/{variables.tigeraOperator.image}:{variables.tigeraOperator.version} $REGISTRY/
{variables.tigeraOperator.image}:{variables.tigeraOperator.version}
{'\n'}
{cmds2}
</CodeBlock>
<li>
<p>Push the images to your registry.</p>
</li>
<CodeBlock language='bash'>
docker push $REGISTRY/{tigeraOperator.image}:{tigeraOperator.version}
docker push $REGISTRY/{variables.tigeraOperator.image}:{variables.tigeraOperator.version}
{'\n'}
{cmds3}
</CodeBlock>
Expand All @@ -54,15 +52,15 @@ export default function MaintenanceImageOptionsAlternateRegistry() {
}

function renderInstallCommands(renderCommand) {
const releaseComponents = releases[0].components;
const releaseComponents = variables.releases[0].components;
const components = Object.keys(releaseComponents);
const filteredComponents = components.filter((c) => imageNames[c] && !c.includes('flannel'));
const componentNames = filteredComponents.map((c) => imageNames[c]);
const filteredComponents = components.filter((c) => variables.imageNames[c] && !c.includes('flannel'));
const componentNames = filteredComponents.map((c) => variables.imageNames[c]);

const result = filteredComponents
.map((c, i) => {
const componentData = releaseComponents[c];
const reg = componentData.registry ? `${componentData.registry}/` : registry;
const reg = componentData.registry ? `${componentData.registry}/` : variables.registry;

return renderCommand(componentData, reg, componentNames, i);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { componentUrl } from '@site/src/components/utils/componentUrl';
import variables from '../../variables';

export default function ReleaseNotes() {
const { prodname, version, imageNames } = variables;
const { imageNames } = variables;

const releases = variables.releases.map((release) => {
let note = release.note;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import Admonition from '@theme/Admonition';
import Heading from '@theme/Heading';

import { prodname } from '../../variables';
import variables from '../../variables';

export default function ReqsKernel() {
return (
Expand All @@ -18,14 +17,14 @@ export default function ReqsKernel() {
</Admonition>
<p>
Due to the large number of distributions and kernel version out there, it’s hard to be precise about the names
of the particular kernel modules that are required to run {prodname}. However, in general, you’ll need:
of the particular kernel modules that are required to run {variables.prodname}. However, in general, you’ll need:
</p>
<ul>
<li>
<p>
The <code>iptables</code> modules (both the “legacy” and “nft” variants are supported). These are typically
broken up into many small modules, one for each type of match criteria and one for each type of action.{' '}
{prodname} requires:
{variables.prodname} requires:
</p>
<ul>
<li>The “base” modules (including the IPv6 versions if IPv6 is enabled in your cluster).</li>
Expand Down Expand Up @@ -55,7 +54,7 @@ export default function ReqsKernel() {
</li>
<li>
<p>
IPIP, VXLAN, Wireguard support, if using {prodname}
IPIP, VXLAN, Wireguard support, if using {variables.prodname}
networking in one of those modes.
</p>
</li>
Expand Down
Loading