Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit dec08d9

Browse files
authored
Merge pull request #25 from vmware-tanzu-labs/develop
v1.4.1
2 parents d3c2f13 + 91d53f3 commit dec08d9

File tree

18 files changed

+243
-205
lines changed

18 files changed

+243
-205
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# image build vars
77
IMAGE ?= projects.registry.vmware.com/rpk/rpk
8-
IMAGE_VERSION ?= v1.4.0
8+
IMAGE_VERSION ?= v1.4.1
99
IMAGE_BASE ?= projects.registry.vmware.com/rpk/rpk-base
1010
IMAGE_BASE_VERSION ?= v1.4.0
1111

docs/CONTRIBUTING.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The following is a set of guidelines for contributing to RPK.
1313
- [Developer Workflow](#developer-workflow)
1414
- [Development Environment](#development-environment)
1515
- [Development Environment Prerequisites](#development-environment-prerequisites)
16+
- [Setup Git](#setup-git)
1617
- [Developing with a Docker Image](#developing-with-a-docker-image)
1718
- [Developing with a Local Environment](#developing-with-a-local-environment)
1819
- [Ansible](#ansible)
@@ -55,7 +56,7 @@ contributions to RPK should align with the ideals and practices that are found t
5556

5657
For more information about RPK and it's relation to TDC, view the following links:
5758

58-
* [Overview](./OVERVIEW.md)
59+
* [Overview](../README.md)
5960
* [Architecture](./ARCHITECTURE.md)
6061

6162
## Git
@@ -66,17 +67,19 @@ The following outlines the simple developer workflow that we use for RPK.
6667

6768
1. Contributor discovers a bug or has an idea for a new feature or an improvement to the existing processes.
6869
2. Contributor opens an issue.
69-
3. Contributor applies the `In Progress` label to the issue and assigns himself/herself to the issue.
70+
3. Contributor assigns himself/herself to the issue.
7071
4. Contributor creates a fork in GitHub to their personal GitHub account.
7172
5. Contributor clones the RPK repo from their fork (e.g. `git clone [email protected]/<GITHUB_ID>/reference-platform-kubernetes.git`). See [Development Environment](#development-environment) for information on environment setup.
7273
6. Working in the new fork on the local development workstation, the contributor modifies the code needed to address the opened and approved issue.
73-
7. Contributor commits and pushes the changes to their fork (`e.g. git add*; git commit -a -m 'Fixes #1, my commit message'; git push --set-upstream origin my-cool-new-feature`)
74-
8. Contributor opens a merge request in GitHub and fills out the appropriate information in the Merge Request.
75-
9. A CI pipeline is kicked off. See [PIPELINE.md](PIPELINE.md) for more details.
74+
7. Contributor commits and pushes the changes to their fork (`e.g. git add*; git commit -a -m -s 'Fixes #1, my commit message'; git push --set-upstream origin my-cool-new-feature`)
75+
1. We do require signed commits as per [DCO](#developer-certificate-of-origin). Here is the process to follow to setup your workstation: https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/signing-commits
76+
8. Contributor opens a merge request **into the develop branch** in GitHub and fills out the appropriate information in the Merge Request.
77+
9. A CI pipeline is kicked off. See [PIPELINE.md](PIPELINE.md) for more details.
7678
1. **NOTE:** failed CI pipeline runs will not be merged.
7779
2. **NOTE:** please keep commits to their individual modules (e.g. `container-registry`, or `storage`) as this helps unit test the independent modules.
7880
10. If additional changes are requested, steps 7-8 can be repeated until the branch is approved for merge by the maintainers.
7981
11. Once the request approved, your code is merged!
82+
12. When a new release is cut, code is merged code is merged from **develop > master**.
8083

8184
### Development Environment
8285

@@ -92,6 +95,11 @@ The following outlines the simple developer workflow that we use for RPK.
9295
* [KIND](providers/kind.md#set-variables)
9396
* [VMware](providers/vmware.md#set-variables)
9497

98+
#### Setup Git
99+
100+
As per [DCO](#developer-certificate-of-origin), we require signed commits **with a 'commit signed off by ...' message**. See
101+
https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/signing-commits for more details on setup.
102+
95103
#### Developing with a Docker Image
96104

97105
Ansible requires several python dependencies in order to run RPK. Often times, this

roles/common/namespace/clean/tasks/clean.yaml

Lines changed: 14 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,27 @@
11
# Copyright 2006-2021 VMware, Inc.
22
# SPDX-License-Identifier: MIT
33
---
4-
- name: "get the namespace-operator pod"
5-
k8s_info:
6-
kind: "Pod"
7-
namespace: "{{ tanzu_workload_tenancy.namespace }}"
8-
context: "{{ tanzu_kubectl_context }}"
9-
label_selectors:
10-
- "app.kubernetes.io/name = {{ tanzu_workload_tenancy.namespace_operator.app_name }}"
11-
register: _namespace_operator_status
12-
when: _namespace_operator_status is not defined
13-
144
- name: "get the tanzu namespace custom resource definition"
155
k8s_info:
166
kind: "CustomResourceDefinition"
177
context: "{{ tanzu_kubectl_context }}"
188
api_version: "apiextensions.k8s.io/v1"
199
name: "tanzunamespaces.tenancy.platform.cnr.vmware.com"
20-
register: _namespace_crd_status
21-
when: _namespace_crd_status is not defined
10+
register: _tns_crd_status
2211

23-
- when:
24-
- (_namespace_operator_status.resources | default([]) | length) > 0
25-
- (_namespace_crd_status.resources | default([]) | length) > 0
26-
block:
27-
- name: "ensure the tanzu namespace resource is removed"
28-
k8s:
29-
state: "absent"
30-
context: "{{ tanzu_kubectl_context }}"
31-
kind: "TanzuNamespace"
32-
name: "{{ namespace }}"
33-
api_version: "tenancy.platform.cnr.vmware.com/v1alpha1"
34-
register: _tns_status
35-
until: not _tns_status.failed
36-
retries: 50
37-
delay: 2
38-
39-
- when:
40-
- (_namespace_operator_status.resources | default([]) | length) == 0
41-
- (_namespace_crd_status.resources | default([]) | length) == 0
42-
block:
43-
- name: "ensure the namespace no longer exists"
44-
k8s:
45-
state: "absent"
46-
context: "{{ tanzu_kubectl_context }}"
47-
kind: "Namespace"
48-
name: "{{ namespace }}"
49-
register: _ns_status
50-
until: not _ns_status.failed
51-
retries: 50
52-
delay: 2
12+
- name: "ensure the tanzu namespace resource is removed"
13+
k8s:
14+
state: "absent"
15+
context: "{{ tanzu_kubectl_context }}"
16+
kind: "TanzuNamespace"
17+
name: "{{ namespace }}"
18+
api_version: "tenancy.platform.cnr.vmware.com/v1alpha1"
19+
register: _tns_status
20+
until: not _tns_status.failed
21+
retries: 50
22+
delay: 2
23+
when:
24+
- (_tns_crd_status.resources | default([]) | length) > 0
5325

5426
- name: "ensure the namespace no longer exists"
5527
k8s:

roles/components/core/identity/common/defaults/main.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ tanzu_identity:
88

99
# ldap
1010
ldap:
11-
image: "projects.registry.vmware.com/rpk/openldap"
12-
image_tag: "1.2.2"
13-
base_dn: "dc={{ tanzu_ingress_domain.split('.') | join(',dc=') }}"
11+
image: "projects.registry.vmware.com/rpk/openldap"
12+
image_tag: "1.2.2"
13+
base_dn: "dc={{ tanzu_ingress_domain.split('.') | join(',dc=') }}"
14+
admin_user: "rpk-admin"
15+
admin_password: "tanzu"
1416
resources:
1517
requests:
1618
cpu: "50m"

roles/components/core/identity/demo/tasks/main.yaml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,13 @@
2525
validate_certs: false
2626
when: tanzu_provider != 'kind'
2727

28-
- name: "write rbac definition file"
29-
template:
30-
src: "rbac.yaml.j2"
31-
dest: "{{ tanzu_identity.staging_dir }}/rbac.yaml"
32-
mode: "0400"
33-
changed_when: false
34-
35-
- name: "ensure rbac exists"
36-
k8s:
37-
state: "present"
38-
context: "{{ tanzu_kubectl_context }}"
39-
src: "{{ tanzu_identity.staging_dir }}/rbac.yaml"
40-
wait: true
41-
wait_timeout: "300"
28+
- name: "ensure demo ldap config exists"
29+
import_role:
30+
name: "common/manifest-file"
31+
vars:
32+
manifest_description: "demo ldap config"
33+
manifest_template: "ldap-config-demo.yaml.j2"
34+
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
4235

4336
- name: "you may obtain your kubectl files with the following information"
4437
debug:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
11
# Copyright 2006-2021 VMware, Inc.
22
# SPDX-License-Identifier: MIT
3+
---
4+
#
5+
# DNS
6+
#
7+
- name: "get the ingress ip"
8+
import_role:
9+
name: "common/ingress-ip"
10+
11+
- name: "ensure dns resolvability for identity module"
12+
include_role:
13+
name: "common/etc-hosts"
14+
vars:
15+
ip: "{{ ingress_ip }}"
16+
fqdn: "{{ item }}"
17+
with_items:
18+
- "{{ tanzu_identity.dex.dns }}"
19+
- "{{ tanzu_identity.gangway.dns }}"
20+
21+
#
22+
# RETRIEVE CLUSTER INFO
23+
#
24+
- name: "retrieve cluster info"
25+
import_role:
26+
name: "common/cluster-info"
27+
when: tanzu_apiserver_url is not defined

roles/components/core/identity/tasks/main.yaml

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,6 @@
1818
namespace_template_file: "tanzu-namespace.yaml.j2"
1919
namespace_file: "{{ tanzu_identity.staging_dir }}/tanzu-namespace.yaml"
2020

21-
#
22-
# DNS
23-
#
24-
- name: "get the ingress ip"
25-
import_role:
26-
name: "common/ingress-ip"
27-
28-
- name: "ensure dns resolvability for identity module"
29-
include_role:
30-
name: "common/etc-hosts"
31-
vars:
32-
ip: "{{ ingress_ip }}"
33-
fqdn: "{{ item }}"
34-
with_items:
35-
- "{{ tanzu_identity.dex.dns }}"
36-
- "{{ tanzu_identity.gangway.dns }}"
37-
38-
#
39-
# RETRIEVE CLUSTER INFO
40-
#
41-
- name: "retrieve cluster info"
42-
import_role:
43-
name: "common/cluster-info"
44-
when: tanzu_apiserver_url is not defined
45-
4621
#
4722
# LDAP
4823
#
@@ -52,7 +27,14 @@
5227
vars:
5328
manifest_description: "ldap pod security policy"
5429
manifest_template: "psp-ldap.yaml.j2"
55-
manifest_file: "psp-ldap.yaml"
30+
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
31+
32+
- name: "ensure ldap config exists"
33+
import_role:
34+
name: "common/manifest-file-with-wait"
35+
vars:
36+
manifest_description: "ldap config"
37+
manifest_template: "config-ldap.yaml.j2"
5638
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
5739

5840
- name: "ensure ldap exists"
@@ -61,7 +43,6 @@
6143
vars:
6244
manifest_description: "ldap"
6345
manifest_template: "app-ldap.yaml.j2"
64-
manifest_file: "app-ldap.yaml"
6546
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
6647

6748
#
@@ -83,9 +64,16 @@
8364
import_role:
8465
name: "common/manifest-file-with-wait"
8566
vars:
86-
manifest_description: "dex"
67+
manifest_description: "dex ingress"
8768
manifest_template: "app-dex.yaml.j2"
88-
manifest_file: "app-dex.yaml"
69+
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
70+
71+
- name: "ensure dex ingress exists"
72+
import_role:
73+
name: "common/manifest-file-with-wait"
74+
vars:
75+
manifest_description: "dex"
76+
manifest_template: "ingress-dex.yaml.j2"
8977
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
9078

9179
#
@@ -109,7 +97,14 @@
10997
vars:
11098
manifest_description: "gangway"
11199
manifest_template: "app-gangway.yaml.j2"
112-
manifest_file: "app-gangway.yaml"
100+
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
101+
102+
- name: "ensure gangway ingress exists"
103+
import_role:
104+
name: "common/manifest-file-with-wait"
105+
vars:
106+
manifest_description: "gangway ingress"
107+
manifest_template: "ingress-gangway.yaml.j2"
113108
manifest_staging_dir: "{{ tanzu_identity.staging_dir }}"
114109

115110
#
@@ -121,7 +116,6 @@
121116
vars:
122117
manifest_description: "psp for reconfiguring kube api server jobs"
123118
manifest_template: "psp-for-job-kube-apiserver.yaml.j2"
124-
manifest_file: "psp-for-job-kube-apiserver.yaml"
125119
manifest_staging_dir: "{{ tanzu_security.staging_dir }}"
126120

127121
- name: "fetch the control plane nodes"

roles/components/core/identity/templates/app-dex.yaml.j2

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,6 @@ spec:
2222
selector:
2323
app.kubernetes.io/name: dex
2424
---
25-
kind: Ingress
26-
apiVersion: extensions/v1beta1
27-
metadata:
28-
name: dex
29-
namespace: "{{ tanzu_identity.namespace }}"
30-
annotations:
31-
external-dns.alpha.kubernetes.io/target: "{{ tanzu_ingress.dns }}"
32-
spec:
33-
rules:
34-
- host: "{{ tanzu_identity.dex.dns }}"
35-
http:
36-
paths:
37-
- path: /
38-
backend:
39-
serviceName: dex
40-
servicePort: 80
41-
tls:
42-
- hosts:
43-
- "{{ tanzu_identity.dex.dns }}"
44-
secretName: dex-cert-tls
45-
---
4625
apiVersion: v1
4726
kind: ConfigMap
4827
metadata:
@@ -131,7 +110,7 @@ rules:
131110
resources:
132111
- customresourcedefinitions
133112
verbs:
134-
- create
113+
- '*'
135114
---
136115
apiVersion: rbac.authorization.k8s.io/v1beta1
137116
kind: ClusterRoleBinding

roles/components/core/identity/templates/app-gangway.yaml.j2

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,6 @@ spec:
1818
selector:
1919
app.kubernetes.io/name: gangway
2020
---
21-
apiVersion: networking.k8s.io/v1beta1
22-
kind: Ingress
23-
metadata:
24-
name: gangway
25-
namespace: "{{ tanzu_identity.namespace }}"
26-
annotations:
27-
external-dns.alpha.kubernetes.io/target: "{{ tanzu_ingress.dns }}"
28-
spec:
29-
rules:
30-
- host: "{{ tanzu_identity.gangway.dns }}"
31-
http:
32-
paths:
33-
- path: /
34-
backend:
35-
serviceName: gangway
36-
servicePort: 80
37-
tls:
38-
- hosts:
39-
- "{{ tanzu_identity.gangway.dns }}"
40-
secretName: gangway-cert-tls
41-
---
4221
apiVersion: v1
4322
kind: ConfigMap
4423
metadata:

0 commit comments

Comments
 (0)