Skip to content

Commit

Permalink
Fix doc generation. (istio#268)
Browse files Browse the repository at this point in the history
- Fix doc build on macOS.

- Reorg a bit of doc content so it gets recognized by the doc extractor

- Improve some of the doc content for better site formatting.
  • Loading branch information
geeknoid authored and istio-testing committed Sep 7, 2019
1 parent 76fab48 commit 1e57b59
Show file tree
Hide file tree
Showing 14 changed files with 1,810 additions and 2,253 deletions.
12 changes: 7 additions & 5 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ update-goldens:

########################

TMPDIR := $(shell mktemp -d)

repo_dir := .
out_path = /tmp
out_path = ${TMPDIR}
protoc = protoc -I/usr/include/protobuf -I.

go_plugin_prefix := --go_out=plugins=grpc,
Expand All @@ -82,9 +84,9 @@ types_v1alpha2_openapi := $(types_v1alpha2_protos:.proto=.json)

$(types_v1alpha2_pb_gos) $(types_v1alpha2_pb_docs) $(types_v1alpha2_pb_pythons): $(types_v1alpha2_protos)
@$(protoc) $(go_plugin) $(protoc_gen_docs_plugin)$(types_v1alpha2_path) $(protoc_gen_python_plugin) $^
@cp -r /tmp/pkg/* pkg/
@cp -r ${TMPDIR}/pkg/* pkg/
@sed -i -e 's|github.com/gogo/protobuf/protobuf/google/protobuf|github.com/gogo/protobuf/types|g' $(types_v1alpha2_path)/istiocontrolplane_types.pb.go
go run $(values_v1alpha2_path)/fixup_structs/main.go -f $(types_v1alpha2_path)/istiocontrolplane_types.pb.go
@GOARCH=amd64 GOOS=linux go run $(values_v1alpha2_path)/fixup_structs/main.go -f $(types_v1alpha2_path)/istiocontrolplane_types.pb.go

generate-types: $(types_v1alpha2_pb_gos) $(types_v1alpha2_pb_docs) $(types_v1alpha2_pb_pythons)

Expand All @@ -100,9 +102,9 @@ values_v1alpha2_openapi := $(values_v1alpha2_protos:.proto=.json)

$(values_v1alpha2_pb_gos) $(values_v1alpha2_pb_docs) $(values_v1alpha2_pb_pythons): $(values_v1alpha2_protos)
@$(protoc) $(go_plugin) $(protoc_gen_docs_plugin)$(values_v1alpha2_path) $(protoc_gen_python_plugin) $^
@cp -r /tmp/pkg/* pkg/
@cp -r ${TMPDIR}/pkg/* pkg/
@sed -i -e 's|github.com/gogo/protobuf/protobuf/google/protobuf|github.com/gogo/protobuf/types|g' $(values_v1alpha2_path)/values_types.pb.go
go run $(values_v1alpha2_path)/fixup_structs/main.go -f $(values_v1alpha2_path)/values_types.pb.go
@GOARCH=amd64 GOOS=linux go run $(values_v1alpha2_path)/fixup_structs/main.go -f $(values_v1alpha2_path)/values_types.pb.go

generate-values: $(values_v1alpha2_pb_gos) $(values_v1alpha2_pb_docs) $(values_v1alpha2_pb_pythons)

Expand Down
2 changes: 1 addition & 1 deletion cmd/mesh/testdata/manifest-generate/output/all_on.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,42 @@ spec:
kind: Deployment
name: istio-pilot
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: istio-pilot-istio-control
labels:
app: pilot
release: istio
rules:
- apiGroups: ["config.istio.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["rbac.istio.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- apiGroups: ["security.istio.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- apiGroups: ["networking.istio.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["authentication.istio.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["*"]
- apiGroups: ["extensions"]
resources: ["ingresses", "ingresses/status"]
verbs: ["*"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["endpoints", "pods", "services", "namespaces", "nodes", "secrets"]
verbs: ["get", "list", "watch"]
---
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -354,78 +390,16 @@ data:
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: "default"
name: "api-server"
namespace: istio-control
labels:
release: istio
spec:
host: "*.local"
host: "kubernetes.default.svc.cluster.local"
trafficPolicy:
tls:
mode: DISABLE
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: istio-pilot
namespace: istio-control
labels:
app: pilot
release: istio
istio: pilot
spec:
minAvailable: 1
selector:
matchLabels:
app: pilot
release: istio
istio: pilot
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: istio-pilot-service-account
namespace: istio-control
labels:
app: pilot
release: istio
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: istio-pilot-istio-control
labels:
app: pilot
release: istio
rules:
- apiGroups: ["config.istio.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["rbac.istio.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- apiGroups: ["security.istio.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- apiGroups: ["networking.istio.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["authentication.istio.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["*"]
- apiGroups: ["extensions"]
resources: ["ingresses", "ingresses/status"]
verbs: ["*"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["endpoints", "pods", "services", "namespaces", "nodes", "secrets"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down Expand Up @@ -613,16 +587,42 @@ data:
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: "api-server"
name: "default"
namespace: istio-control
labels:
release: istio
spec:
host: "kubernetes.default.svc.cluster.local"
host: "*.local"
trafficPolicy:
tls:
mode: DISABLE
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: istio-pilot
namespace: istio-control
labels:
app: pilot
release: istio
istio: pilot
spec:
minAvailable: 1
selector:
matchLabels:
app: pilot
release: istio
istio: pilot
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: istio-pilot-service-account
namespace: istio-control
labels:
app: pilot
release: istio
---

# Resources for crds component

Expand Down
Loading

0 comments on commit 1e57b59

Please sign in to comment.