Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Feature flags for calico with CRDs and optionally typha #683

Merged
merged 14 commits into from
Feb 7, 2019

Conversation

JoshVanL
Copy link
Contributor

fixes #435

Add Kubernetes API server as optional backend, as well as enabling Typha for Calico

/assign

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 16, 2019
@jetstack-bot jetstack-bot added area/puppet Indicates a PR is affecting Puppet manifests size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/documentation Categorizes issue or PR as related to documentation. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 16, 2019
@JoshVanL JoshVanL force-pushed the 435-calico-kubernetes-backend branch 2 times, most recently from 0b8ffa6 to de5ebed Compare January 17, 2019 16:01
@JoshVanL
Copy link
Contributor Author

/unassign
/assign @simonswine

@jetstack-bot jetstack-bot assigned simonswine and unassigned JoshVanL Jan 18, 2019
@JoshVanL JoshVanL changed the title WIP: Feature flags for calico with CRDs and eventually typha Feature flags for calico with CRDs and eventually typha Jan 18, 2019
@jetstack-bot jetstack-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 18, 2019
@JoshVanL JoshVanL changed the title Feature flags for calico with CRDs and eventually typha Feature flags for calico with CRDs and optionally typha Jan 18, 2019
Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from this extra type for backend, I am happy

/assign @JoshVanL
/unassign

@@ -228,6 +229,12 @@ type ClusterKubernetesControllerManager struct {
FeatureGates map[string]bool `json:"featureGates,omitempty"`
}

type ClusterKubernetesCalico struct {
Backend string `json:"backend"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be it's own type

type ClusterKubernetesCalcioBackend string

@@ -71,6 +71,22 @@ func SetDefaults_Cluster(obj *Cluster) {
obj.Kubernetes.Dashboard = &ClusterKubernetesDashboard{}
}

if obj.Kubernetes.Calico == nil {
obj.Kubernetes.Calico = &ClusterKubernetesCalico{
Backend: "etcd",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we define a const instead?

@@ -589,6 +598,35 @@ func (c *Cluster) validatePrometheusMode() error {
return result
}

func (c *Cluster) validateCalico() error {
var result *multierror.Error
backends := []string{"etcd", "kubernetes"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get it from constants

@jetstack-bot jetstack-bot assigned JoshVanL and unassigned simonswine Jan 29, 2019
@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 29, 2019
@@ -0,0 +1,179 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you not using the other file and just template out some parts?

# chosen from this range. Changing this value after installation will have
# no effect. This should fall within `--cluster-cidr`.
- name: CALICO_IPV4POOL_CIDR
value: "192.168.0.0/16"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

            # Configure the IP Pool from which Pod IPs will be chosen.
            - name: CALICO_IPV4POOL_CIDR
               value: "<%= @ipv4_pool_cidr %>"`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you enable it right now this break cross AZ connectivity

value: "192.168.0.0/16"
# Enable IPIP
- name: CALICO_IPV4POOL_IPIP
value: "Always"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

            - name: CALICO_IPV4POOL_IPIP
              value: "<%= @ipv4_pool_ipip_mode %>"

@JoshVanL JoshVanL force-pushed the 435-calico-kubernetes-backend branch 2 times, most recently from a3f3427 to e6de841 Compare January 31, 2019 11:57
@JoshVanL
Copy link
Contributor Author

/unassign
/assign @simonswine

@jetstack-bot jetstack-bot assigned JoshVanL and unassigned simonswine Feb 6, 2019
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2019
@JoshVanL JoshVanL force-pushed the 435-calico-kubernetes-backend branch from 7af8360 to 34a3ebe Compare February 7, 2019 09:51
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2019
@JoshVanL JoshVanL force-pushed the 435-calico-kubernetes-backend branch 2 times, most recently from c1f511d to efb40e9 Compare February 7, 2019 10:26
JoshVanL and others added 14 commits February 7, 2019 10:39
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Improve Calico backend API types

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: Christian Simon <simon@swine.de>
Correct handling for our addon-manager check

Signed-off-by: Christian Simon <simon@swine.de>
Signed-off-by: Christian Simon <simon@swine.de>
Signed-off-by: Christian Simon <simon@swine.de>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
@JoshVanL JoshVanL force-pushed the 435-calico-kubernetes-backend branch from efb40e9 to bcba5ce Compare February 7, 2019 10:39
@JoshVanL
Copy link
Contributor Author

JoshVanL commented Feb 7, 2019

/unassign
/assign @simonswine

@jetstack-bot jetstack-bot assigned simonswine and unassigned JoshVanL Feb 7, 2019
@simonswine
Copy link
Contributor

Thanks this looks good

/approve
/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2019
@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoshVanL, simonswine

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JoshVanL,simonswine]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot merged commit 7cc8622 into jetstack:master Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/puppet Indicates a PR is affecting Puppet manifests dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature flags for calico with CRDs and eventually typha
3 participants